From 4f28e84e802013156a32c5803257dfd90523d924 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 12:19:20 +0600 Subject: [PATCH 01/12] wc and wp updated updated --- woo-product-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/woo-product-table.php b/woo-product-table.php index d204900f..aee0bcec 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -11,7 +11,7 @@ * Requires at least: 4.0.0 * Tested up to: 6.5.2 * WC requires at least: 5.0.0 - * WC tested up to: 8.7.2 + * WC tested up to: 8.8.3 * * * Text Domain: woo-product-table From 9dc6c9c0c20b440e7c4f4d0a84d010d9a9844770 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 13:08:00 +0600 Subject: [PATCH 02/12] functions file has bring at the top side --- woo-product-table.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/woo-product-table.php b/woo-product-table.php index aee0bcec..6399837d 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -446,6 +446,15 @@ public function init(){ * @author Saiful Islam */ 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 +510,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'); From 27013247a98429ef99cda58dd35bb3c199b354ae Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 16:07:45 +0600 Subject: [PATCH 03/12] Renew it to enable pro features --- admin/page-loader.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/page-loader.php b/admin/page-loader.php index afa42800..918bc3f1 100644 --- a/admin/page-loader.php +++ b/admin/page-loader.php @@ -209,7 +209,7 @@ public function renew_license_notice() $expired_date = date( 'd M, Y', $this->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(); ?>
From 332fecc60ac152720c14c1429ebcf7b35d7af5f3 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 16:16:38 +0600 Subject: [PATCH 04/12] working --- admin/page-loader.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/admin/page-loader.php b/admin/page-loader.php index 918bc3f1..30444202 100644 --- a/admin/page-loader.php +++ b/admin/page-loader.php @@ -166,7 +166,7 @@ public function handle_license_n_update() * @author Saiful Islam */ if( empty( $this->license_status ) || empty( $this->license_data ) ) return; - + $this->license_activation_message(); $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 +198,14 @@ public function handle_license_n_update() add_action( 'admin_notices', [$this, 'renew_license_notice'] ); } - } + public function license_activation_message() + { + if( $this->license_status == 'valid' ){ + + } + } public function renew_license_notice() { From 9efc5df3c881b0cb4b57208a8b8e6668750262f9 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 16:19:02 +0600 Subject: [PATCH 05/12] license_activation_message --- admin/page-loader.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/admin/page-loader.php b/admin/page-loader.php index 30444202..397b73c4 100644 --- a/admin/page-loader.php +++ b/admin/page-loader.php @@ -159,6 +159,9 @@ 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); + + $this->license_activation_message(); + /** * Actually if not found lisen data, we will return null here * @@ -166,7 +169,7 @@ public function handle_license_n_update() * @author Saiful Islam */ if( empty( $this->license_status ) || empty( $this->license_data ) ) return; - $this->license_activation_message(); + $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; @@ -202,7 +205,7 @@ public function handle_license_n_update() public function license_activation_message() { - if( $this->license_status == 'valid' ){ + if( $this->license_status !== 'valid' ){ } } From f220f2de2ba2cbc3d0eb418bb3a30929b69f3d8b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 30 Apr 2024 17:25:12 +0600 Subject: [PATCH 06/12] issue fixed finally --- admin/page-loader.php | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/admin/page-loader.php b/admin/page-loader.php index 397b73c4..f2348193 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'] ); - // } } @@ -160,7 +154,8 @@ public function handle_license_n_update() $this->license_status = get_option( $this->license_status_key ); $this->license_data = get_option($this->license_data_key); - $this->license_activation_message(); + + add_action( 'admin_notices', [$this, 'license_activation_message'] ); /** * Actually if not found lisen data, we will return null here @@ -205,8 +200,29 @@ public function handle_license_n_update() public function license_activation_message() { - if( $this->license_status !== 'valid' ){ + + 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' ){ + $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 +
+
+ Date: Tue, 30 Apr 2024 17:49:43 +0600 Subject: [PATCH 07/12] issue fixed --- admin/page-loader.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/admin/page-loader.php b/admin/page-loader.php index f2348193..b0811192 100644 --- a/admin/page-loader.php +++ b/admin/page-loader.php @@ -200,12 +200,12 @@ public function handle_license_n_update() 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' ){ + 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' ); From 41dc55d9f33def2091f2b580f5b51cfa151f7a1b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 1 May 2024 13:13:02 +0600 Subject: [PATCH 08/12] page number issue has been solved --- assets/js/wpt-control.js | 1 + 1 file changed, 1 insertion(+) 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, From 6abc0fc3b211f551b7ba7a17de2f1d3404b5426d Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 6 May 2024 12:06:04 +0600 Subject: [PATCH 09/12] Requires Plugins: woocommerce --- woo-product-table.php | 1 + 1 file changed, 1 insertion(+) diff --git a/woo-product-table.php b/woo-product-table.php index 6399837d..a2f3b86d 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -1,6 +1,7 @@ Date: Tue, 7 May 2024 11:46:41 +0600 Subject: [PATCH 10/12] Fixed: YITH qutoe request button quantity issue solved. --- admin/action-hook.php | 18 +++++++++++------- includes/items/quoterequest.php | 9 ++++++--- readme.txt | 1 + 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/admin/action-hook.php b/admin/action-hook.php index 9d321905..957d55fd 100644 --- a/admin/action-hook.php +++ b/admin/action-hook.php @@ -1046,12 +1046,16 @@ 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; + return; + $display = ''; + if( ! defined( 'YITH_YWRAQ_VERSION' ) ){ + $display = 'display:none'; + } $page = isset( $settings['page'] ) ? $settings['page'] : 'not_set_page'; ?> -
+
@@ -1074,7 +1078,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1092,7 +1096,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1110,7 +1114,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1127,7 +1131,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
@@ -1145,7 +1149,7 @@ function wpt_configure_external_part( $settings,$current_config_value,$field_nam
- +
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 From 85f80ab5de990c025f17164d8749ece5b27a5091 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 7 May 2024 11:59:38 +0600 Subject: [PATCH 11/12] return null removed --- admin/action-hook.php | 1 - 1 file changed, 1 deletion(-) diff --git a/admin/action-hook.php b/admin/action-hook.php index 957d55fd..b0e8dc6f 100644 --- a/admin/action-hook.php +++ b/admin/action-hook.php @@ -1046,7 +1046,6 @@ function wpt_configure_label_part($settings, $current_config_value,$field_name){ * @return void */ function wpt_configure_external_part( $settings,$current_config_value,$field_name ){ - return; $display = ''; if( ! defined( 'YITH_YWRAQ_VERSION' ) ){ $display = 'display:none'; From 29162aa6e79f29c9dde67ba47f2261a8c1625ee9 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 7 May 2024 13:08:33 +0600 Subject: [PATCH 12/12] redirect issue solved --- admin/post_metabox.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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';