diff --git a/admin/action-hook.php b/admin/action-hook.php index 9d321905..b0e8dc6f 100644 --- a/admin/action-hook.php +++ b/admin/action-hook.php @@ -1046,12 +1046,15 @@ function wpt_configure_label_part($settings, $current_config_value,$field_name){ * @return void */ function wpt_configure_external_part( $settings,$current_config_value,$field_name ){ - if( ! defined( 'YITH_WCQV_VERSION' ) ) return; + $display = ''; + if( ! defined( 'YITH_YWRAQ_VERSION' ) ){ + $display = 'display:none'; + } $page = isset( $settings['page'] ) ? $settings['page'] : 'not_set_page'; ?> -
+
@@ -1074,7 +1077,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1092,7 +1095,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1110,7 +1113,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1127,7 +1130,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1145,7 +1148,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
diff --git a/admin/page-loader.php b/admin/page-loader.php index afa42800..b0811192 100644 --- a/admin/page-loader.php +++ b/admin/page-loader.php @@ -59,12 +59,6 @@ public function admin_menu() if( ! $this->is_pro ){ add_submenu_page( $this->main_slug, esc_html__( 'GET PRO VERSION', 'woo-product-table' ), __( 'Get Pro', 'woo-product-table' ), 'read', 'https://wooproducttable.com/pricing/' ); } - // var_dump($this->license); - - //License Menu if pro version is getter or equal V2.0.8.4 - // if( is_object( $this->license ) && version_compare($this->pro_version, '2.0.8.4', '>=')){ - // add_submenu_page( $this->main_slug, __('Min Max Control License', 'wcmmq_pro'), __( 'License', 'wcmmq_pro' ), $capability, 'wcmmq-license', [$this->license, 'license_page'] ); - // } } @@ -159,6 +153,10 @@ public function handle_license_n_update() $this->license_status_key = 'wpt_pro_license_status'; $this->license_status = get_option( $this->license_status_key ); $this->license_data = get_option($this->license_data_key); + + + add_action( 'admin_notices', [$this, 'license_activation_message'] ); + /** * Actually if not found lisen data, we will return null here * @@ -166,7 +164,7 @@ public function handle_license_n_update() * @author Saiful Islam */ if( empty( $this->license_status ) || empty( $this->license_data ) ) return; - + $expires = isset($this->license_data->expires) ? $this->license_data->expires : ''; $this->item_id = isset($this->license_data->item_id) ? $this->license_data->item_id : ''; if('lifetime' == $expires) return; @@ -198,9 +196,35 @@ public function handle_license_n_update() add_action( 'admin_notices', [$this, 'renew_license_notice'] ); } - } + public function license_activation_message() + { + + if( ! empty( $_GET['page'] ) && $_GET['page'] === 'woo-product-table-license' ) return; + if(empty($this->item_id)) return; + $wpt_logo = WPT_ASSETS_URL . 'images/logo.png'; + + if( empty( $this->license_status ) || $this->license_status === 'invalid' || $this->license_status === 'site_inactive' || $this->license_status === 'inactive' ){ + $wpt_logo = WPT_ASSETS_URL . 'images/logo.png'; + + $link_label = __( 'Activate License', 'wpt_pro' ); + $link = admin_url('edit.php?post_type=wpt_product_table&page=woo-product-table-license'); + $message = esc_html__( ' Please Activate License to get Pro Feature', 'wpt_pro' ); + ob_start(); + ?> +
+
+ + Your License of Woo Product Table pro is Invalid/Inactive + %1$s %3$s +
+
+ exp_timestamp ); $link_label = __( 'Renew License', 'wpt_pro' ); $link = "https://codeastrology.com/checkout/?edd_license_key={$this->license_key}&download_id={$this->item_id}"; - $message = esc_html__( ' Renew it to get latest update.', 'wpt_pro' ) . ''; + $message = esc_html__( ' Renew it to enable pro features.', 'wpt_pro' ) . ''; ob_start(); ?>
diff --git a/admin/post_metabox.php b/admin/post_metabox.php index b922dca5..42e815ee 100644 --- a/admin/post_metabox.php +++ b/admin/post_metabox.php @@ -189,13 +189,13 @@ function wpt_redirect_after_save($location, $post_id) { */ if ( ! isset( $_POST['wpt_shortcode_nonce_value'] ) ) { // Check if our nonce is set. - return; + return $location; } // verify this came from the our screen and with proper authorization, // because save_post can be triggered at other times if( ! wp_verify_nonce( $_POST['wpt_shortcode_nonce_value'], plugin_basename(__FILE__) ) ) { - return; + return $location; } $wpt_last_active_tab = $_POST['wpt_last_active_tab'] ?? 'column_settings'; diff --git a/assets/js/wpt-control.js b/assets/js/wpt-control.js index c9fc4878..c4df7ac2 100644 --- a/assets/js/wpt-control.js +++ b/assets/js/wpt-control.js @@ -118,6 +118,7 @@ jQuery(function($) { var thisButton = $(this); var thisPagination = thisButton.closest('.wpt_my_pagination'); var page_number = $(thisButton).text(); + page_number = parseInt(page_number.replace(/,/g, ''), 10); var others = { page_number: page_number, isMob: isMob, diff --git a/includes/items/quoterequest.php b/includes/items/quoterequest.php index eb3a9d5e..ce925723 100644 --- a/includes/items/quoterequest.php +++ b/includes/items/quoterequest.php @@ -45,6 +45,7 @@ return; } + $wpt_nonce = wp_create_nonce( 'add-request-quote-' . $data['id'] ); $default_quantity = apply_filters( 'woocommerce_quantity_input_min', 1, $product ); $quote_class = 'enabled'; @@ -53,13 +54,15 @@ } $c_product_id = $data['id']; -$Add_to_Quote = $config_value['yith_add_to_quote_text'];//'Add to Quote'; -$data_message = '{"text":"'. $Add_to_Quote .'","adding":"' . $config_value['yith_add_to_quote_adding'] . '","added":"' . $config_value['yith_add_to_quote_added'] . '"}'; +$Add_to_Quote = $config_value['yith_add_to_quote_text'] ?? __('Add to Quote', 'woo-product-table');//'Add to Quote'; +$adding = $config_value['yith_add_to_quote_adding'] ?? __('Adding...', 'woo-product-table');//'Adding...'; +$added = $config_value['yith_add_to_quote_added'] ?? __('Added', 'woo-product-table');//'Added'; +$data_message = '{"text":"'. $Add_to_Quote .'","adding":"' . $adding . '","added":"' . $added . '"}'; $q_final_class = "{$quote_class} yith_request_temp_{$temp_number}_id_{$data['id']} wpt_yith_add_to_quote_request wpt_add-request-quote-button"; ?> -' +' data-response_msg='' data-msg='' data-wp_nonce='' diff --git a/readme.txt b/readme.txt index 6cee186c..a90f6736 100644 --- a/readme.txt +++ b/readme.txt @@ -334,6 +334,7 @@ You can easily show specific category products. While creating new table click o == Changelog == = 3.4.9 = +* Fixed: YITH qutoe request button quantity issue solved. * Variation List showing on Shop Page for Variable product issue has been fixed * Fixed: last-active-tab issue has been fixed. * Bug fixed diff --git a/woo-product-table.php b/woo-product-table.php index d204900f..a2f3b86d 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -1,6 +1,7 @@ */ include_once $dir . '/autoloader.php'; + + /** + * Include Functions + * it was bottom site of this method, + * I have bring at the begining of this method. + * + * @since 3.4.9.0 + */ + include_once $this->path('BASE_DIR','includes/functions.php'); //why this file outside of is_admin() actually if we want to show preview, need load outside. include_once $this->path('BASE_DIR','admin/wpt_product_table_post.php'); if( is_admin() ){ @@ -501,7 +511,7 @@ public function init(){ */ //include_once $this->path('BASE_DIR','includes/wpt_product_table_post.php'); include_once $this->path('BASE_DIR','includes/enqueue.php'); - include_once $this->path('BASE_DIR','includes/functions.php'); + include_once $this->path('BASE_DIR','includes/helper-functions.php'); include_once $this->path('BASE_DIR','includes/shortcode.php');