From 5a799d72edeeb0655dcf0d15272268872f675402 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 22 Aug 2024 11:25:30 +0600 Subject: [PATCH 01/34] admin.css file load based on $current_screen global variable. updated changeloag --- admin/admin-enqueue.php | 5 ++++- readme.txt | 3 +++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/admin/admin-enqueue.php b/admin/admin-enqueue.php index bf5672e0..655401d0 100644 --- a/admin/admin-enqueue.php +++ b/admin/admin-enqueue.php @@ -7,7 +7,10 @@ * @update 1.0.3 */ function wpt_admin_enqueue(){ - + global $current_screen; + $s_id = isset( $current_screen->id ) ? $current_screen->id : ''; + if( strpos( $s_id, 'wpt') === false ) return; + /** * Customized fontello file * @since 3.1.8.2 diff --git a/readme.txt b/readme.txt index 81369ef0..b336c546 100644 --- a/readme.txt +++ b/readme.txt @@ -333,6 +333,9 @@ You can easily show specific category products. While creating new table click o == Changelog == += 3.5.1 = +* Fixed: Avada Forn Entries table issue fixed. + = 3.5.0 = * Fixed: Quote Request premium version issue fixed. * Fixed: variation title issue fixed. From 075093a7e750146ecd7204600308d1fe40d72e63 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 18 Sep 2024 13:45:16 +0600 Subject: [PATCH 02/34] behaviour normal issue has been fixed. --- assets/js/wpt-control.js | 2 ++ inc/shortcode-ajax.php | 6 +++++- inc/shortcode.php | 1 + includes/functions.php | 10 ++++++---- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/assets/js/wpt-control.js b/assets/js/wpt-control.js index c4df7ac2..adb22da4 100644 --- a/assets/js/wpt-control.js +++ b/assets/js/wpt-control.js @@ -33,6 +33,7 @@ jQuery(function($) { var thisTable = $('#table_id_' + table_id); var TableTagWrap = $('#table_id_' + table_id + ' .wpt_table_tag_wrapper'); var SearchWrap = $('#table_id_' + table_id + ' .wpt-search-full-wrapper'); + var data_json = thisTable.data('basic_settings'); if( thisTable.length < 1 ){ console.log("Error on: ajaxTableLoad. Table not found!"); return; @@ -43,6 +44,7 @@ jQuery(function($) { table_id: table_id, others: others, args: args, + atts: data_json.atts //Available ATTS also here }; TableTagWrap.addClass('wpt-ajax-loading'); //.wpt-wrap.wpt-ajax-loading diff --git a/inc/shortcode-ajax.php b/inc/shortcode-ajax.php index d8d3f160..a3217597 100644 --- a/inc/shortcode-ajax.php +++ b/inc/shortcode-ajax.php @@ -398,6 +398,9 @@ public function wpt_remove_from_cart(){ * need to send $_POST method * Where NEED Available $_POST['table_id'] * + * new added atts other than table_id + * added from wpt-control.js file + * as well as shortcode.php by basic_settings * * @param string $method To be $_POST['table_id'] * @return void @@ -405,7 +408,8 @@ public function wpt_remove_from_cart(){ public function set_atts(){ $table_id = $_POST['table_id'] ?? 0; $table_id = (int) $table_id; - $atts = ['id'=> $table_id]; + $atts = $_POST['atts'] ?? []; + $atts['id'] = $table_id; return $atts; } diff --git a/inc/shortcode.php b/inc/shortcode.php index 56440876..1edd5140 100644 --- a/inc/shortcode.php +++ b/inc/shortcode.php @@ -418,6 +418,7 @@ public function startup_loader( $atts ){ 'add_to_cart' => $this->add_to_cart_text, 'site_url' => site_url(), 'ajax_action' => $this->basics['ajax_action'] ?? '', + 'atts' => $this->atts ]; diff --git a/includes/functions.php b/includes/functions.php index 3d559f33..c6f9f32a 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -1127,8 +1127,8 @@ function wpt_get_value_with_woocommerce_unit( $target_unit, $value ){ * @param type $column_array * @return type */ - function wpt_args_manipulation_frontend( $args ){ - + function wpt_args_manipulation_frontend( $args, $table_ID, $atts ){ + /** * This is an extra and hidden feature * which has no any option, @@ -1138,7 +1138,9 @@ function wpt_args_manipulation_frontend( $args ){ * * @since 3.1.8.4 */ - $behavior = $args['behavior'] ?? ''; + $behavior = $atts['behavior'] ?? ''; + $args['behavior'] = $behavior; + if( is_page() || is_single() || $behavior == 'normal' ){ return $args; } @@ -1178,7 +1180,7 @@ function wpt_args_manipulation_frontend( $args ){ return $args; } } -add_filter( 'wpto_table_query_args', 'wpt_args_manipulation_frontend' ); +add_filter( 'wpto_table_query_args', 'wpt_args_manipulation_frontend', 10, 3 ); if( ! function_exists( 'wpt_args_manage_by_get_args' ) ){ From 319ecc21f43a1e1a61ad2fcd67e33ccce3bdcaee Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 18 Sep 2024 14:17:03 +0600 Subject: [PATCH 03/34] Issue fixed and version update and offer shown --- admin/admin-enqueue.php | 7 +- assets/css/admin.css | 132 +----------------------------------- assets/css/notice.css | 145 ++++++++++++++++++++++++++++++++++++++++ framework/handle.php | 10 +-- readme.txt | 5 +- woo-product-table.php | 6 +- 6 files changed, 163 insertions(+), 142 deletions(-) create mode 100644 assets/css/notice.css diff --git a/admin/admin-enqueue.php b/admin/admin-enqueue.php index 655401d0..8d95cfef 100644 --- a/admin/admin-enqueue.php +++ b/admin/admin-enqueue.php @@ -9,7 +9,12 @@ function wpt_admin_enqueue(){ global $current_screen; $s_id = isset( $current_screen->id ) ? $current_screen->id : ''; - if( strpos( $s_id, 'wpt') === false ) return; + + if( strpos( $s_id, 'wpt') === false ){ + //Actually Admin css file need, when there is no wpt on screen + wp_enqueue_style( 'wpt-admin-notice', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/css/notice.css', array(), WPT_DEV_VERSION, 'all' ); + return; + } /** * Customized fontello file diff --git a/assets/css/admin.css b/assets/css/admin.css index 5e0529ff..8edd8dda 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1837,82 +1837,7 @@ p.lang-area-title {margin: 0;} -.notice.ca-notice.notice-offer { - background: #ffffff; - border: 0 none; - /* padding-bottom: 5px; */ -} -.anywhere-notice.ca-notice.notice-offer { - padding: 3px 10px; - border: 0 none; -} - -.notice.ca-notice.notice-offer .ca-msg-text p { - font-size: 16px; - padding: 0; - margin: 0; -} -.anywhere-notice.ca-notice.notice-offer .ca-msg-text p{font-size: 20px;} -.notice.ca-notice.notice-offer .ca-msg-text h1 { - color: #e91e63; - padding: 0; - margin: 0; - font-size: 15px; -} -.notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { - clear: both; - margin: 5px 0 10px 0; -} -.notice.ca-notice.notice-offer a.ca-logo-link img, -.notice.ca-notice.notice-offer a.ca-logo-link img, .anywhere-notice.ca-notice.notice-offer .ca-logo img { - border-radius: 50%; - height: 75px; - width: 75px; - border: 3px solid #ffffff; -} -.anywhere-notice.ca-notice .ca-notice-dismiss{display: none !important;} -.notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { - padding: 5px 15px; - margin: 0; - clear: both; -} -.anywhere-notice {} - -.anywhere-notice h1 { - font-size: 16px; - padding: 0; - margin: 0; -} -.anywhere-notice .ca-msg-text { - padding: 0; - margin: 0; -} - -.anywhere-notice .ca-msg-text p { - padding: 0; - margin: 0; - font-size: 14px !important; - color: #007694; - float: left; - display: inherit; - width: fit-content; - /* background: gainsboro; */ -} - -.anywhere-notice p.ca-links-collection { - /* background: red; */ - width: fit-content; - float: right; - position: absolute; - right: 15px; - top: 40%; -} - -.anywhere-notice p.ca-links-collection a.ca-button { - padding: 5px 12px; - background: #ff9800; -} p.wpt-shorcode-render-box { font-size: 16px; margin: 0; @@ -2218,14 +2143,7 @@ div.wpt-content p.wpt-issue-submit a:hover { background: rgb(204, 204, 204); color: #4caf50; } -.wpt-plugin-recommend-area .anywhere-notice.ca-notice.notice-success[data-notice_id="black-friday-22"] { - background: black; - text-align: center; - display: flex; - justify-content: center; - align-items: center; - flex: 1 100%; -} + /********Configure Tab Area Start*********/ @@ -2479,51 +2397,3 @@ div.wpt_tab_content table th { .wpt_column_setting_extra>div>label { display: inline !important; } - -.fieldwrap .anywhere-notice .ca-msg-text p { - display: none; -} - -.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { - display: block; -} - -.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text h1 { - color: red; -} - -.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { - background: #4CAF50; -} - - - -/* black Friday offer */ -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] { - background: #ffffff8f; - color: #6e6e6e; - box-shadow: 1px -1px 30px #0000000a; -} -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] a.ca-logo-link img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] a.ca-logo-link img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] a { - border: 0 none !important; -} -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] .ca-msg-text h1 { - color: #ff0000; - font-size: 19px; -} -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] .ca-msg-text p>b:last-child { - color: red; -} -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] .ca-msg-text p>b>i { - color: #4CAF50; -} -.notice.ca-notice.notice-offer[data-notice_id="wpt_CHRISTMAS2023_offer"] .ca-msg-text p { - padding-bottom: 5px; -} - -.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { - display: none; -} \ No newline at end of file diff --git a/assets/css/notice.css b/assets/css/notice.css new file mode 100644 index 00000000..a19bd111 --- /dev/null +++ b/assets/css/notice.css @@ -0,0 +1,145 @@ + + + + +.notice.ca-notice.notice-offer { + background: #ffffff; + border: 0 none; + /* padding-bottom: 5px; */ +} +.anywhere-notice.ca-notice.notice-offer { + padding: 3px 10px; + border: 0 none; +} + +.notice.ca-notice.notice-offer .ca-msg-text p { + font-size: 16px; + padding: 0; + margin: 0; +} +.anywhere-notice.ca-notice.notice-offer .ca-msg-text p{font-size: 20px;} +.notice.ca-notice.notice-offer .ca-msg-text h1 { + color: #e91e63; + padding: 0; + margin: 0; + font-size: 15px; +} +.notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { + clear: both; + margin: 5px 0 10px 0; +} +.notice.ca-notice.notice-offer a.ca-logo-link img, +.notice.ca-notice.notice-offer a.ca-logo-link img, .anywhere-notice.ca-notice.notice-offer .ca-logo img { + border-radius: 50%; + height: 75px; + width: 75px; + border: 3px solid #ffffff; +} +.anywhere-notice.ca-notice .ca-notice-dismiss{display: none !important;} +.notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { + padding: 5px 15px; + margin: 0; + clear: both; +} +.anywhere-notice {} + +.anywhere-notice h1 { + font-size: 16px; + padding: 0; + margin: 0; +} + +.anywhere-notice .ca-msg-text { + padding: 0; + margin: 0; +} + +.anywhere-notice .ca-msg-text p { + padding: 0; + margin: 0; + font-size: 14px !important; + color: #007694; + float: left; + display: inherit; + width: fit-content; + /* background: gainsboro; */ +} + +.anywhere-notice p.ca-links-collection { + /* background: red; */ + width: fit-content; + float: right; + position: absolute; + right: 15px; + top: 40%; +} + +.anywhere-notice p.ca-links-collection a.ca-button { + padding: 5px 12px; + background: #ff9800; +} + + + + + +.wpt-plugin-recommend-area .anywhere-notice.ca-notice.notice-success[data-notice_id="black-friday-22"] { + background: black; + text-align: center; + display: flex; + justify-content: center; + align-items: center; + flex: 1 100%; +} + + + +.fieldwrap .anywhere-notice .ca-msg-text p { + display: none; +} + +.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { + display: block; +} + +.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text h1 { + color: red; +} + +.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { + background: #4CAF50; +} + + + + + +/* black Friday offer */ +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] { + /* background: #ffffff8f; */ + color: #6e6e6e; + box-shadow: 1px -1px 30px #0000000a; +} +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a.ca-logo-link img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a.ca-logo-link img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a { + border: 0 none !important; +} +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text h1 { + color: #ff0000; + font-size: 19px; +} +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p>b:last-child { + color: red; +} +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p>b>i { + color: #4CAF50; +} +.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p { + padding-bottom: 5px; +} + +.fieldwrap .anywhere-notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { + display: none; +} \ No newline at end of file diff --git a/framework/handle.php b/framework/handle.php index bd275443..ce92f844 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -64,11 +64,11 @@ public static function display_notice() $temp_numb = rand(2,5); - $coupon_Code = 'FLASH_SALE_2024'; + $coupon_Code = '20DAYSDEAL'; $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; - $my_message = 'Product Table Primium version on Sale (Woo Product Table Pro) Plugin. Take it First!'; + $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); - $offerNc->set_title( 'FLASH SALE UPTO 70%' ) + $offerNc->set_title( 'Special Offer for you' ) ->set_diff_limit(5) ->set_type('offer') ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') @@ -81,8 +81,8 @@ public static function display_notice() ]); $offerNc->add_button([ - 'text' => 'WordPress Plugins', - 'link' => 'https://codeastrology.com/downloads/category/premium/' + 'text' => 'Helpful WooCommerce Plugins', + 'link' => 'https://codeastrology.com/downloads/category/premium/?discount=' . $coupon_Code, ]); if($temp_numb == 5) $offerNc->show(); diff --git a/readme.txt b/readme.txt index b336c546..d7a7d716 100644 --- a/readme.txt +++ b/readme.txt @@ -3,8 +3,8 @@ Contributors: codersaiful,mdibrahimk48,ultraaddons,unikforce,rafiul17,fazlebari Donate link: https://donate.stripe.com/4gw2bB2Pzdjd8mYfYZ Tags: wc product table, woo table, woo product table,woocommerce product table, product table Requires at least: 4.0.0 -Tested up to: 6.5.5 -Stable tag: 3.5.0 +Tested up to: 6.6.2 +Stable tag: 3.5.1 Requires PHP: 5.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -335,6 +335,7 @@ You can easily show specific category products. While creating new table click o = 3.5.1 = * Fixed: Avada Forn Entries table issue fixed. +* Fixed: behaviour normal issue has been fixed. = 3.5.0 = * Fixed: Quote Request premium version issue fixed. diff --git a/woo-product-table.php b/woo-product-table.php index d23b0bfc..bc813cb8 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -8,11 +8,11 @@ * Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version * Tags: wooproducttable, woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table * - * Version: 3.5.0 + * Version: 3.5.1 * Requires at least: 4.0.0 - * Tested up to: 6.5.5 + * Tested up to: 6.6.2 * WC requires at least: 5.0.0 - * WC tested up to: 9.0.2 + * WC tested up to: 9.3.1 * * * Text Domain: woo-product-table From 120a16771cd6c4a9c8c6faf763bd44ad841c7020 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 18 Sep 2024 15:54:12 +0600 Subject: [PATCH 04/34] offer showing finalized --- admin/admin-enqueue.php | 11 ++++-- framework/handle.php | 79 ++++++++++++++++++++++------------------- 2 files changed, 51 insertions(+), 39 deletions(-) diff --git a/admin/admin-enqueue.php b/admin/admin-enqueue.php index 8d95cfef..e7cd510a 100644 --- a/admin/admin-enqueue.php +++ b/admin/admin-enqueue.php @@ -11,8 +11,7 @@ function wpt_admin_enqueue(){ $s_id = isset( $current_screen->id ) ? $current_screen->id : ''; if( strpos( $s_id, 'wpt') === false ){ - //Actually Admin css file need, when there is no wpt on screen - wp_enqueue_style( 'wpt-admin-notice', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/css/notice.css', array(), WPT_DEV_VERSION, 'all' ); + wpt_admin_notice_css_file_load(); return; } @@ -39,7 +38,7 @@ function wpt_admin_enqueue(){ wp_enqueue_style( 'wpt-admin', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/css/admin.css', array('select2'), WPT_DEV_VERSION, 'all' ); - + wpt_admin_notice_css_file_load(); //jQuery file including. jQuery is a already registerd to WordPress wp_enqueue_script( 'jquery' ); @@ -70,6 +69,12 @@ function wpt_admin_enqueue(){ add_action( 'admin_enqueue_scripts', 'wpt_admin_enqueue', 99 ); +function wpt_admin_notice_css_file_load(){ + //Actually Admin css file need, when there is no wpt on screen + wp_enqueue_style( 'wpt-admin-notice', WPT_Product_Table::getPath( 'BASE_URL' ) . 'assets/css/notice.css', array(), WPT_DEV_VERSION, 'all' ); + +} + if( !function_exists( 'wpt_admin_js_fast_load' ) ){ /** * For first load, It's specially loaded diff --git a/framework/handle.php b/framework/handle.php index ce92f844..ad0298ff 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -50,43 +50,50 @@ public static function fail() */ public static function display_notice() { - /** - * eTa muloto seisob kustomer er jonno - * jara oofer message dekhe khub birokto hoyeche, eTa tader jonno. - * - * add_filter('wpt_offer_show', '__return_false'); - * taholei offer showing off hoye jabe. - */ - $return_true = apply_filters( 'wpt_offer_show', true ); - if( !$return_true ) return; - if( defined( 'WPT_PRO_DEV_VERSION' ) ) return; - if( ! is_admin() ) return; - - $temp_numb = rand(2,5); - - $coupon_Code = '20DAYSDEAL'; - $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; - $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; - $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); - $offerNc->set_title( 'Special Offer for you' ) - ->set_diff_limit(5) - ->set_type('offer') - ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') - ->set_img_target( $target ) - ->set_message( $my_message ) - ->add_button([ - 'text' => 'Claim Discount', - 'type' => 'offer', - 'link' => 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code, - ]); - - $offerNc->add_button([ - 'text' => 'Helpful WooCommerce Plugins', - 'link' => 'https://codeastrology.com/downloads/category/premium/?discount=' . $coupon_Code, - ]); + if( ! is_admin() ) return; - if($temp_numb == 5) $offerNc->show(); - + $last_date = '30 sept 2024'; //Last date string to show offer + $last_date_timestamp = strtotime( $last_date ); + + if( time() > $last_date_timestamp ) return; + + /** + * eTa muloto seisob kustomer er jonno + * jara oofer message dekhe khub birokto hoyeche, eTa tader jonno. + * + * add_filter('wpt_offer_show', '__return_false'); + * taholei offer showing off hoye jabe. + */ + $return_true = apply_filters( 'wpt_offer_show', true ); + if( !$return_true ) return; + if( defined( 'WPT_PRO_DEV_VERSION' ) ) return; + + + $temp_numb = rand(2,5); + + $coupon_Code = '20DAYSDEAL'; + $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; + $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; + $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); + $offerNc->set_title( 'COUPON for Woo Product Table' ) + ->set_diff_limit(5) + ->set_type('offer') + ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') + ->set_img_target( $target ) + ->set_message( $my_message ) + ->add_button([ + 'text' => 'Claim Discount', + 'type' => 'offer', + 'link' => 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code, + ]); + + $offerNc->add_button([ + 'text' => 'Helpful WooCommerce Plugins', + 'link' => 'https://codeastrology.com/downloads/category/premium/?discount=' . $coupon_Code, + ]); + + if($temp_numb == 5) $offerNc->show(); + } From c21557e3471c7b01b39345fb6906b89229df277b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 18 Sep 2024 15:54:41 +0600 Subject: [PATCH 05/34] 'WPT_DEV_VERSION', '3.5.1.0' --- 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 bc813cb8..b6c29765 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -34,7 +34,7 @@ } if( ! defined( 'WPT_DEV_VERSION' ) ){ - define( 'WPT_DEV_VERSION', '3.5.0.0' ); + define( 'WPT_DEV_VERSION', '3.5.1.0' ); } if( ! defined( 'WPT_CAPABILITY' ) ){ From 923a64df12d28dedba63e25347823670be02034c Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Mon, 23 Sep 2024 18:22:50 +0600 Subject: [PATCH 06/34] spelling fixed for forn to form --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index d7a7d716..39c22e36 100644 --- a/readme.txt +++ b/readme.txt @@ -334,7 +334,7 @@ You can easily show specific category products. While creating new table click o == Changelog == = 3.5.1 = -* Fixed: Avada Forn Entries table issue fixed. +* Fixed: Avada Form Entries table issue fixed. * Fixed: behaviour normal issue has been fixed. = 3.5.0 = From 1682b46590cdf94a2ac8ef7bd1f0593a066515cc Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Tue, 1 Oct 2024 18:03:21 +0600 Subject: [PATCH 07/34] WC tested up to: 9.3.3 --- 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 b6c29765..4515fbed 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -12,7 +12,7 @@ * Requires at least: 4.0.0 * Tested up to: 6.6.2 * WC requires at least: 5.0.0 - * WC tested up to: 9.3.1 + * WC tested up to: 9.3.3 * * * Text Domain: woo-product-table From 01886cc095cf1785dd2990f385ac5c39a7e8a823 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 24 Nov 2024 12:27:59 +0600 Subject: [PATCH 08/34] var_dump_table vulnerity issue fixed --- inc/shortcode-base.php | 38 ++++++++++++++++++++++++++++++++++++++ readme.txt | 8 ++++++-- woo-product-table.php | 6 +++--- 3 files changed, 47 insertions(+), 5 deletions(-) diff --git a/inc/shortcode-base.php b/inc/shortcode-base.php index 2c729ef6..129991e2 100644 --- a/inc/shortcode-base.php +++ b/inc/shortcode-base.php @@ -207,9 +207,47 @@ protected function get_is_table(){ * @return void */ protected function get_var_for_Dev(){ + // Checking var_dump_table param if( ! isset( $_GET['var_dump_table'] ) ) return; $var = $_GET['var_dump_table'] ?? ''; + // Checking security for var value if( 'sAiFul-CoDeAsTrOlOGy' !== $var ) return; + + $permission = current_user_can( 'manage_wpt_product_table' ); + //Checking user permission If only available manage_wpt_product_table permission, which is + //neeed for Product Table edit permission. + if( ! $permission ) return; + + $nonce = $_GET['nonce'] ?? ''; + + /** + * If only found user edit permission for a user, then it will create new nonce + * of it will check nonce actually + * + * Checking nonce + * If not match nonce, create new nonce + * Even if user permission available, then it will create new nonce. + * + * @author Saiful Islam + * @since 3.5.2 + * + */ + if( ! wp_verify_nonce( $nonce, __FILE__ ) ){ + $nonce = wp_create_nonce( __FILE__ ); + + // Get the full current URL, including the path and query string + $current_url = ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + + // Add or update the parameter in the URL + $updated_url = add_query_arg( 'nonce', $nonce, $current_url ); + + ?> + See Debug Here + Date: Tue, 3 Dec 2024 19:48:09 +0600 Subject: [PATCH 09/34] Also done offer showing. need one more time --- admin/page/product-bulk-edit.php | 123 +++++++++++++++++----------- admin/tabs/search_n_filter.php | 3 + assets/css/admin.css | 13 --- assets/css/notice.css | 65 +++++++++++++-- framework/handle.php | 133 ++++++++++++++++++++++++++++--- woo-product-table.php | 4 +- 6 files changed, 264 insertions(+), 77 deletions(-) diff --git a/admin/page/product-bulk-edit.php b/admin/page/product-bulk-edit.php index 5f28bf9a..760e17f6 100644 --- a/admin/page/product-bulk-edit.php +++ b/admin/page/product-bulk-edit.php @@ -13,63 +13,92 @@

- + - Get Sync Master Sheet Premium - Get Sync Master Sheet Premium + display_table_full(); - - }else{ + } else { + - ?> -
- - - - - - - - - - - - - - -
-
-

Need to intall and activate following

-
- -
-
-
-
-
- -
- -
-
-
- -

Highly Recommeded this plugin. Which will help you to bulk edit of your all product.

-
-
- -
+
+ + + + + + + + + + + + + + +
+
+

Need to intall and activate following

+
+ +
+
+
+
+
+ +

+

Features of Sync Master Sheet Plugin:

+ ✅ Google Sheets Integration Live syncronize with Google Sheets
+ 🔥 Stock Synchronize for Multiple at a time, User able to syncronize multiple website from a Google Sheet
+ ✅ Two-Way Product Synchronize Site to Google sheet and Google Sheet to site syncronize.
+ ✅ Edit Product Details directly from Google Sheets, including Name/Title, Price, Regular Price, SKU, and Custom Fields
+ ✅ Add Unlimited New Products from Google Sheets
+ ✅ Bulk Edit Products using Google Sheets
+ ✅ Manage WooCommerce Custom Fields (Meta Data) with seamless sync
+ ✅ Integration with Secure Custom Fields Columns (previously known as ACF Plugin)
+ ✅ Update Product Status easily via Google Sheets
+ ✅ Quick Edit Options available directly in the plugin settings (including Table Title)
+ ✅ Show/Hide Columns in Google Sheets for a customized view
+ ✅ Export Unlimited Products to Google Sheets
+ ✅ Full Support for Variable Products in Google Sheets
+ ✅ Filter by Category (multiple filters supported) in Google Sheets
+ ✅ Column Sorting for better data management in Google Sheets
+ ✅ Display Product URLs in Google Sheets
+ ✅ View Product Edit Links directly from Google Sheets
+ + Upcoming Features:
+ 🌟 Synchronize and Edit Product Image
+ 🌟 Synchronize and Edit Long and Short Descriptions
+ 🌟 Synchronize and Edit Product Attributes
+ 🌟 Synchronize and Edit Product Categories
+ 🌟 Synchronize and Edit Product Tags

+ ----------------------------------------------------
+ Easily manage and synchronize your WooCommerce product stock with the power of Google Sheets using our plugin – Product Stock Sync with Google Sheets for WooCommerce. This intuitive solution empowers you to streamline your inventory management effortlessly. +

+ +
+ +
+
+
+ +

Highly Recommeded this plugin. Which will help you to bulk edit of your all product.

+
+
+ +
diff --git a/admin/tabs/search_n_filter.php b/admin/tabs/search_n_filter.php index cb01a0f2..ebd9a3c3 100644 --- a/admin/tabs/search_n_filter.php +++ b/admin/tabs/search_n_filter.php @@ -111,6 +111,7 @@ $newArrs = []; if( is_array( $taxonomy_keywords ) && is_array( $allTerms ) ){ foreach( $taxonomy_keywords as $ky ){ + if( ! isset( $allTerms[$ky] ) ) continue; $newArrs[$ky] = $allTerms[$ky]; } $newArrs = array_merge($newArrs, $allTerms); @@ -169,6 +170,7 @@ $newArrs = []; if( is_array( $selected ) && is_array( $tax_object ) ){ foreach( $selected as $ky ){ + if( ! isset( $tax_object[$ky] ) ) continue; $newArrs[$ky] = $tax_object[$ky]; } @@ -248,6 +250,7 @@ $newArrs = []; if( is_array( $mini_filter_keywords ) && is_array( $allTerms ) ){ foreach( $mini_filter_keywords as $ky ){ + if( ! isset( $allTerms[$ky] ) ) continue; $newArrs[$ky] = $allTerms[$ky]; } $newArrs = array_merge($newArrs, $allTerms); diff --git a/assets/css/admin.css b/assets/css/admin.css index 8edd8dda..3d800a88 100644 --- a/assets/css/admin.css +++ b/assets/css/admin.css @@ -1978,19 +1978,6 @@ span.wpt-expand { cursor: pointer; font-size: 15px; } -li#menu-posts-wpt_product_table ul.wp-submenu.wp-submenu-wrap li>a>i { - color: white; - display: block; - background: #4caf50; - padding: 7px; - font-size: 120%; - transition: all .3s; -} -li#menu-posts-wpt_product_table ul.wp-submenu.wp-submenu-wrap:hover li>a>i { - color: #ff2626; - background: #000000; - padding-left: 18px; -} label.switch.switch-big { width: 200px !important; diff --git a/assets/css/notice.css b/assets/css/notice.css index a19bd111..03a02a2b 100644 --- a/assets/css/notice.css +++ b/assets/css/notice.css @@ -1,11 +1,57 @@ - +li#menu-posts-wpt_product_table ul.wp-submenu.wp-submenu-wrap li>a>i { + color: white; + display: block; + background: #4caf50; + padding: 7px; + font-size: 120%; + transition: all .3s; +} +li#menu-posts-wpt_product_table ul.wp-submenu.wp-submenu-wrap:hover li>a>i { + color: #ff2626; + background: #000000; + padding-left: 18px; +} + +@keyframes wpt-gradient-animation { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + +li#menu-posts-wpt_product_table .wp-menu-name { + font-size: 97%; + background: linear-gradient(90deg, #515c4a4d, #2271b133, #4caf5033); + + /* background: linear-gradient(90deg, #b2ff7e4d, #ff758c0f, #e208ff99); */ + /* background: linear-gradient(90deg, #b2ff7e4d, #ff758c0f, #e208ff99); */ + background-size: 200% 200%; /* Ensure the gradient can animate smoothly */ + /* -webkit-background-clip: text; + -webkit-text-fill-color: transparent; */ + /* -webkit-background-clip: text; Clips the background to the text */ + /* -webkit-text-fill-color: transparent; Makes the text itself transparent */ + animation: wpt-gradient-animation 10s ease infinite; /* Applies the animation */ +} + +li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { + background: linear-gradient(90deg, #b2ff7e4d, #ff758c0f, #ffffff5c); + background-size: 200% 200%; /* Ensure the gradient can animate smoothly */ + animation: wpt-gradient-animation 10s ease infinite; /* Applies the animation */ +} .notice.ca-notice.notice-offer { background: #ffffff; border: 0 none; - /* padding-bottom: 5px; */ + padding: 10px 25px !important; + border-radius: 9px; + box-shadow: 0 2px 10px #64646424; } .anywhere-notice.ca-notice.notice-offer { padding: 3px 10px; @@ -16,13 +62,16 @@ font-size: 16px; padding: 0; margin: 0; + color: #607D8B; + margin-bottom: 10px; } .anywhere-notice.ca-notice.notice-offer .ca-msg-text p{font-size: 20px;} .notice.ca-notice.notice-offer .ca-msg-text h1 { - color: #e91e63; + color: red; padding: 0; margin: 0; - font-size: 15px; + font-size: 22px; + text-transform: inherit; } .notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection { clear: both; @@ -33,13 +82,19 @@ border-radius: 50%; height: 75px; width: 75px; - border: 3px solid #ffffff; + border: none 0; } .anywhere-notice.ca-notice .ca-notice-dismiss{display: none !important;} .notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { padding: 5px 15px; margin: 0; clear: both; + border: 0 none; + background-color: #4CAF50; + color: #f5fff6; +} +.ca-notice-content { + gap: 25px; } .anywhere-notice {} diff --git a/framework/handle.php b/framework/handle.php index ad0298ff..f0180ed5 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -9,6 +9,9 @@ class WPT_Required { + + public static $coupon_Code; + public static $stop_next = 0; public function __construct() { @@ -36,6 +39,19 @@ public static function fail() self::$stop_next += $req_wc_next; if( ! $req_wc_next ){ + // add_action('wpt_loaded', function(){ + // if( ! is_admin() ) return; + + // global $current_screen; + // $s_id = isset( $current_screen->id ) ? $current_screen->id : ''; + // // self::Notice( 5 ); + // if( strpos( $s_id, 'product_table') === false ){ + // self::Notice( 5, $s_id . ' - '); + // return; + // } + // }, 10); + + self::display_notice(); self::display_common_notice(); } @@ -52,10 +68,26 @@ public static function display_notice() { if( ! is_admin() ) return; - $last_date = '30 sept 2024'; //Last date string to show offer + $return_true = apply_filters( 'wpt_offer_show', true ); + if( !$return_true ) return; + + $last_date = '31 Dec 2024'; //Last date string to show offer $last_date_timestamp = strtotime( $last_date ); if( time() > $last_date_timestamp ) return; + + + //Only when in product table page, So it will show always + $s_id = $_SERVER['REQUEST_URI'] ?? ''; + if( strpos( $s_id, 'product_table') !== false ){ + if( defined( 'WPT_PRO_DEV_VERSION' ) ){ + self::OtherOffer(); + }else{ + self::Notice( 5); + } + + return; + } /** * eTa muloto seisob kustomer er jonno @@ -64,19 +96,101 @@ public static function display_notice() * add_filter('wpt_offer_show', '__return_false'); * taholei offer showing off hoye jabe. */ - $return_true = apply_filters( 'wpt_offer_show', true ); - if( !$return_true ) return; - if( defined( 'WPT_PRO_DEV_VERSION' ) ) return; + $temp_numb = rand(4,5); + if( defined( 'WPT_PRO_DEV_VERSION' ) ){ + self::OtherOffer( $temp_numb); + return; + } + + + + self::Notice( $temp_numb); + + + + + } + + protected static function OtherOffer( $probability = 5 ) + { + if( $probability !== 5 ) return; + $fullArgs = [ + [ + 'title' => 'BLACKFRIDAY - Sync master sheet', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', + 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', + 'button_text' => 'Start to Sync with Google Sheets', + ], + + [ + 'title' => 'Offer - Min Max Control (PRO)', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wooproducttable.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', + 'message' => 'Toffers to display specific products with minimum, maximum quantity.', + 'button_text' => 'Ok, Start Now!', + ], + [ + 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/header-logo.png', + 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + 'button_text' => 'Checkout our Plugins', + ], + [ + 'title' => 'Get all Free Plugins for WooCommrce', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/header-logo.png', + 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + 'button_text' => 'Get it Now', + ], + + ]; + $rand_args = $fullArgs[rand(0, count($fullArgs) - 1)]; + self::GetCustomOffer( $rand_args ); + + + } + + protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ] ) + { + + $coupon_code = $args['coupon_code'] ?? 'BLACKFRIDAY2024'; + $target = $args['target_url'] ?? 'https://wooproducttable.com/pricing/?discount=' . $coupon_code . '&campaign=' . $coupon_code . '&ref=1&utm_source=Default_Offer_LINK'; + $img_url = $args['img_url'] ?? WPT_BASE_URL. 'assets/images/round-logo.png'; + $message = $args['message'] ?? ''; + $message .= '
Coupon Code: ' . $coupon_code; + $button_text = $args['button_text'] ?? 'Claim Discount'; + $title = $args['title'] ?? 'BLACKFRIDAY2024 for Woo Product Table'; - $temp_numb = rand(2,5); + $offerNc = new Notice('wpt_'.$coupon_code.'_offer'); + $offerNc->set_title( $title ) + ->set_diff_limit(1) + ->set_type('offer') + ->set_img( $img_url) + ->set_img_target( $target ) + ->set_message( $message ) + ->add_button([ + 'text' => $button_text, + 'type' => 'offer', + 'link' => $target, + ]); - $coupon_Code = '20DAYSDEAL'; + $offerNc->show(); + } + protected static function Notice( $temp_numb) + { + $coupon_Code = 'BLACKFRIDAY2024'; $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); - $offerNc->set_title( 'COUPON for Woo Product Table' ) - ->set_diff_limit(5) + $offerNc->set_title( 'BLACKFRIDAY2024 for Woo Product Table' ) + ->set_diff_limit(2) ->set_type('offer') ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') ->set_img_target( $target ) @@ -93,9 +207,6 @@ public static function display_notice() ]); if($temp_numb == 5) $offerNc->show(); - - - } private static function display_notice_on_pro() diff --git a/woo-product-table.php b/woo-product-table.php index 12ff4a15..5f3a8142 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -439,7 +439,7 @@ public function __construct() { } public function init(){ - + do_action( 'wpt_load' ); $dir = dirname( __FILE__ ); //dirname( __FILE__ ) /** * Include Autoloader @@ -534,6 +534,8 @@ public function init(){ if( has_filter( 'wpml_current_language' ) ){ include_once $this->path('BASE_DIR','wpml/init.php'); } + + do_action( 'wpt_loaded' ); } public function load_textdomain() { From d4ecf299fb42e1c68901cd50fd2b69bb9277e3f0 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 10:34:01 +0600 Subject: [PATCH 10/34] Almost Done --- assets/css/notice.css | 18 +++++++++++++++--- framework/handle.php | 18 ++++++++++-------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/assets/css/notice.css b/assets/css/notice.css index 03a02a2b..9e366ebc 100644 --- a/assets/css/notice.css +++ b/assets/css/notice.css @@ -63,7 +63,7 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { padding: 0; margin: 0; color: #607D8B; - margin-bottom: 10px; + /* margin-bottom: 10px; */ } .anywhere-notice.ca-notice.notice-offer .ca-msg-text p{font-size: 20px;} .notice.ca-notice.notice-offer .ca-msg-text h1 { @@ -79,11 +79,23 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { } .notice.ca-notice.notice-offer a.ca-logo-link img, .notice.ca-notice.notice-offer a.ca-logo-link img, .anywhere-notice.ca-notice.notice-offer .ca-logo img { - border-radius: 50%; height: 75px; - width: 75px; border: none 0; } +.notice.ca-notice.notice-offer a.ca-logo-link img, .notice.ca-notice.notice-offer a.ca-logo-link img { + width: auto !important; + border-radius: 0 !important; +} +.notice.ca-notice.notice-offer .ca-msg-text .notice-coupon-code { + /* margin-top: -8px; */ + color: #673AB7; + /* background: black; */ + /* padding: 5px; */ + display: inline-block; + font-weight: bold; + font-family: monospace; + width: fit-content; +} .anywhere-notice.ca-notice .ca-notice-dismiss{display: none !important;} .notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { padding: 5px 15px; diff --git a/framework/handle.php b/framework/handle.php index f0180ed5..07f5cd1d 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -136,7 +136,7 @@ protected static function OtherOffer( $probability = 5 ) 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/header-logo.png', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', 'button_text' => 'Checkout our Plugins', ], @@ -144,31 +144,33 @@ protected static function OtherOffer( $probability = 5 ) 'title' => 'Get all Free Plugins for WooCommrce', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/header-logo.png', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', 'button_text' => 'Get it Now', ], ]; - $rand_args = $fullArgs[rand(0, count($fullArgs) - 1)]; - self::GetCustomOffer( $rand_args ); + $arr_index = rand(0, count($fullArgs) - 1); + $rand_args = $fullArgs[$arr_index]; + self::GetCustomOffer( $rand_args, $arr_index ); } - protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ] ) + protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => '', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ], $arr_index = false ) { $coupon_code = $args['coupon_code'] ?? 'BLACKFRIDAY2024'; $target = $args['target_url'] ?? 'https://wooproducttable.com/pricing/?discount=' . $coupon_code . '&campaign=' . $coupon_code . '&ref=1&utm_source=Default_Offer_LINK'; $img_url = $args['img_url'] ?? WPT_BASE_URL. 'assets/images/round-logo.png'; $message = $args['message'] ?? ''; - $message .= '
Coupon Code: ' . $coupon_code; + $message .= '

Coupon Code: ' . $coupon_code . '

'; $button_text = $args['button_text'] ?? 'Claim Discount'; $title = $args['title'] ?? 'BLACKFRIDAY2024 for Woo Product Table'; - - $offerNc = new Notice('wpt_'.$coupon_code.'_offer'); + $notice_id = 'wpt_'.$coupon_code.'_offer'; + if( $arr_index !== false ) $notice_id = 'wpt_'.$coupon_code.'_offer_' . $arr_index; + $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) ->set_diff_limit(1) ->set_type('offer') From 22c727c94a4d70e1d3b46247c23145979dba60ea Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 11:11:11 +0600 Subject: [PATCH 11/34] Notice Done --- assets/css/notice.css | 6 ++-- framework/handle.php | 72 ++++++++++++++++++++++++++----------------- 2 files changed, 45 insertions(+), 33 deletions(-) diff --git a/assets/css/notice.css b/assets/css/notice.css index 9e366ebc..9edbf7ef 100644 --- a/assets/css/notice.css +++ b/assets/css/notice.css @@ -87,22 +87,20 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { border-radius: 0 !important; } .notice.ca-notice.notice-offer .ca-msg-text .notice-coupon-code { - /* margin-top: -8px; */ color: #673AB7; - /* background: black; */ - /* padding: 5px; */ display: inline-block; font-weight: bold; font-family: monospace; width: fit-content; + margin: 0; } .anywhere-notice.ca-notice .ca-notice-dismiss{display: none !important;} +.notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a.ca-button-type-offer {background-color: #4CAF50;} .notice.ca-notice.notice-offer .ca-msg-text p.ca-links-collection a { padding: 5px 15px; margin: 0; clear: both; border: 0 none; - background-color: #4CAF50; color: #f5fff6; } .ca-notice-content { diff --git a/framework/handle.php b/framework/handle.php index 07f5cd1d..d04697bb 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -39,21 +39,8 @@ public static function fail() self::$stop_next += $req_wc_next; if( ! $req_wc_next ){ - // add_action('wpt_loaded', function(){ - // if( ! is_admin() ) return; - - // global $current_screen; - // $s_id = isset( $current_screen->id ) ? $current_screen->id : ''; - // // self::Notice( 5 ); - // if( strpos( $s_id, 'product_table') === false ){ - // self::Notice( 5, $s_id . ' - '); - // return; - // } - // }, 10); - - self::display_notice(); - self::display_common_notice(); + // self::display_common_notice(); } return self::$stop_next; @@ -81,9 +68,10 @@ public static function display_notice() $s_id = $_SERVER['REQUEST_URI'] ?? ''; if( strpos( $s_id, 'product_table') !== false ){ if( defined( 'WPT_PRO_DEV_VERSION' ) ){ - self::OtherOffer(); + self::OtherOffer(5, $s_id); + return; }else{ - self::Notice( 5); + self::AllOfferWithOwnOffer(5, $s_id); } return; @@ -101,22 +89,34 @@ public static function display_notice() self::OtherOffer( $temp_numb); return; } - + self::AllOfferWithOwnOffer( $temp_numb ); + } - self::Notice( $temp_numb); - - - + /** + * It will show other plugin offer also this plugin's offer + * + * @param integer $probability + * @param string $extra_for_id + * @return void + */ + protected static function AllOfferWithOwnOffer( $probability = 5, $extra_for_id = '' ) + { + $extra_for_id = $extra_for_id ? $extra_for_id : ''; + $this_rand = rand(1,5); + if( $this_rand > 2 ){ + self::Notice( $probability); + }else{ + self::OtherOffer( $probability, $extra_for_id); + } } - - protected static function OtherOffer( $probability = 5 ) + protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) { if( $probability !== 5 ) return; $fullArgs = [ [ - 'title' => 'BLACKFRIDAY - Sync master sheet', + 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', @@ -125,11 +125,11 @@ protected static function OtherOffer( $probability = 5 ) ], [ - 'title' => 'Offer - Min Max Control (PRO)', + 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wooproducttable.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', - 'message' => 'Toffers to display specific products with minimum, maximum quantity.', + 'message' => 'Offers to display specific products with minimum, maximum quantity.', 'button_text' => 'Ok, Start Now!', ], [ @@ -153,23 +153,31 @@ protected static function OtherOffer( $probability = 5 ) $arr_index = rand(0, count($fullArgs) - 1); $rand_args = $fullArgs[$arr_index]; - self::GetCustomOffer( $rand_args, $arr_index ); + self::GetCustomOffer( $rand_args, $arr_index, $extra_for_id ); } - protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => '', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ], $arr_index = false ) + protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => '', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ], $arr_index = false, $extra_for_id = '' ) { + /** + * proti index er jonno alada alada id generate hobe. + * jeno alada alada dissmiss korte hoy + * ebong amader plugin bade jeno alada alada dismiss korte hoy. + * sejonno notun id generate korar jonno extra_for_id use korte hobe. + * sei bebostha korechi. + */ $coupon_code = $args['coupon_code'] ?? 'BLACKFRIDAY2024'; $target = $args['target_url'] ?? 'https://wooproducttable.com/pricing/?discount=' . $coupon_code . '&campaign=' . $coupon_code . '&ref=1&utm_source=Default_Offer_LINK'; $img_url = $args['img_url'] ?? WPT_BASE_URL. 'assets/images/round-logo.png'; $message = $args['message'] ?? ''; $message .= '

Coupon Code: ' . $coupon_code . '

'; $button_text = $args['button_text'] ?? 'Claim Discount'; - $title = $args['title'] ?? 'BLACKFRIDAY2024 for Woo Product Table'; + $title = $args['title'] ?? 'BLACKFRIDAY2024 OFFER for Woo Product Table'; $notice_id = 'wpt_'.$coupon_code.'_offer'; if( $arr_index !== false ) $notice_id = 'wpt_'.$coupon_code.'_offer_' . $arr_index; + if( ! empty( $extra_for_id ) ) $notice_id = $notice_id . '_' . $extra_for_id; $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) ->set_diff_limit(1) @@ -183,6 +191,12 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' 'link' => $target, ]); + $offerNc->add_button([ + 'text' => 'Free Plugins', + 'type' => 'warning', + 'link' => 'https://profiles.wordpress.org/codersaiful/#content-plugins', + ]); + $offerNc->show(); } protected static function Notice( $temp_numb) From af21d7268ff9966b836ee6c765056599f440c14b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 12:36:53 +0600 Subject: [PATCH 12/34] change log updated --- framework/handle.php | 76 ++++++++++++++++++++++++++----------------- readme.txt | 9 ++++- woo-product-table.php | 4 +-- 3 files changed, 56 insertions(+), 33 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index d04697bb..90c1ad84 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -104,8 +104,8 @@ protected static function AllOfferWithOwnOffer( $probability = 5, $extra_for_id { $extra_for_id = $extra_for_id ? $extra_for_id : ''; - $this_rand = rand(1,5); - if( $this_rand > 2 ){ + $this_rand = rand(1,9); + if( $this_rand <= 3 ){ self::Notice( $probability); }else{ self::OtherOffer( $probability, $extra_for_id); @@ -132,6 +132,38 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'message' => 'Offers to display specific products with minimum, maximum quantity.', 'button_text' => 'Ok, Start Now!', ], + [ + 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', + 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', + 'button_text' => 'Get it Now', + ], + [ + 'title' => 'Sheet to Table Live Sync for Google Sheet', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', + 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', + 'message' => 'Live Google Sheet Sync, Smart Caching for Instant Loading, Show Sheen your site by Shortcode.', + 'button_text' => 'Free Download Now', + ], + [ + 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', + 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', + 'button_text' => 'Free Download Now', + ], + [ + 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', + 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', + 'button_text' => 'Free Download Now', + ], [ 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', 'coupon_code' => 'BLACKFRIDAY2024', @@ -158,7 +190,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) } - protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => '', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '' ], $arr_index = false, $extra_for_id = '' ) + protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' => '', 'target_url' => '', 'img_url' => '', 'message' => '', 'button_text' => '', 'coupon_show_bool' => true ], $arr_index = false, $extra_for_id = '' ) { /** @@ -171,16 +203,23 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' $coupon_code = $args['coupon_code'] ?? 'BLACKFRIDAY2024'; $target = $args['target_url'] ?? 'https://wooproducttable.com/pricing/?discount=' . $coupon_code . '&campaign=' . $coupon_code . '&ref=1&utm_source=Default_Offer_LINK'; $img_url = $args['img_url'] ?? WPT_BASE_URL. 'assets/images/round-logo.png'; - $message = $args['message'] ?? ''; - $message .= '

Coupon Code: ' . $coupon_code . '

'; $button_text = $args['button_text'] ?? 'Claim Discount'; + $coupon_show_bool = $args['coupon_show_bool'] ?? true; + if( $button_text === 'Free Download Now' ){ + $coupon_show_bool = false; + } + $message = $args['message'] ?? ''; + if( $coupon_show_bool === true){ + $message .= '

Coupon Code: ' . $coupon_code . '

'; + } + $title = $args['title'] ?? 'BLACKFRIDAY2024 OFFER for Woo Product Table'; $notice_id = 'wpt_'.$coupon_code.'_offer'; if( $arr_index !== false ) $notice_id = 'wpt_'.$coupon_code.'_offer_' . $arr_index; if( ! empty( $extra_for_id ) ) $notice_id = $notice_id . '_' . $extra_for_id; $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) - ->set_diff_limit(1) + ->set_diff_limit(4) ->set_type('offer') ->set_img( $img_url) ->set_img_target( $target ) @@ -206,7 +245,7 @@ protected static function Notice( $temp_numb) $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); $offerNc->set_title( 'BLACKFRIDAY2024 for Woo Product Table' ) - ->set_diff_limit(2) + ->set_diff_limit(5) ->set_type('offer') ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') ->set_img_target( $target ) @@ -225,29 +264,6 @@ protected static function Notice( $temp_numb) if($temp_numb == 5) $offerNc->show(); } - private static function display_notice_on_pro() - { - - $temp_numb = rand(1, 35); - $coupon_Code = 'SPECIAL_OFFER_' . date('M_Y'); - $target = 'https://codeastrology.com/downloads/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; - $my_message = 'Speciall Discount on All CodeAstrology Products'; - $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); - $offerNc->set_title( 'SPECIAL OFFER' ) - ->set_diff_limit(10) - ->set_type('offer') - ->set_img( WPT_BASE_URL. 'assets/images/brand/social/web.png') - ->set_img_target( $target ) - ->set_message( $my_message ) - ->add_button([ - 'text' => 'Get WooCommerce Product with Discount', - 'type' => 'success', - 'link' => $target, - ]); - - if($temp_numb == 35) $offerNc->show(); - } - /** * Common Notice for Product table, where no need Pro version. * diff --git a/readme.txt b/readme.txt index d9b93d0d..ea9377b8 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://donate.stripe.com/4gw2bB2Pzdjd8mYfYZ Tags: wc product table, woo table, woo product table,woocommerce product table, product table Requires at least: 4.0.0 Tested up to: 6.7.1 -Stable tag: 3.5.2 +Stable tag: 3.5.3 Requires PHP: 5.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -333,6 +333,13 @@ You can easily show specific category products. While creating new table click o == Changelog == += 3.5.3 = +* Added: two new action hook added 'wpt_load', 'wpt_loaded'. +* Compatibility check with latest WooCommerce version. +* Compatibility check with latest WordPress version. +* Fixed: textdomain issue fixed on latest WordPress. +* Bug fixed + = 3.5.2 = * Fixed: fixed 'var_dump_table' security issue. * Bug fixed diff --git a/woo-product-table.php b/woo-product-table.php index 5f3a8142..74c3635c 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -8,7 +8,7 @@ * Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version * Tags: wooproducttable, woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table * - * Version: 3.5.2 + * Version: 3.5.3 * Requires at least: 4.0.0 * Tested up to: 6.7.1 * WC requires at least: 5.0.0 @@ -34,7 +34,7 @@ } if( ! defined( 'WPT_DEV_VERSION' ) ){ - define( 'WPT_DEV_VERSION', '3.5.2.0' ); + define( 'WPT_DEV_VERSION', '3.5.3.0' ); } if( ! defined( 'WPT_CAPABILITY' ) ){ From a58093b5fad6199c6df7a59a8c02e709a287c640 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 15:55:22 +0600 Subject: [PATCH 13/34] working for notice --- framework/handle.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/framework/handle.php b/framework/handle.php index 90c1ad84..b3585642 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -11,6 +11,10 @@ class WPT_Required { public static $coupon_Code; + public static $current_plugin_ids = [ + 'woo-product-table/woo-product-table.php', + 'woo-product-table-pro/woo-product-table-pro.php' + ]; public static $stop_next = 0; public function __construct() @@ -116,6 +120,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) if( $probability !== 5 ) return; $fullArgs = [ [ + 'plugin_id' => 'product-sync-master-sheet/product-sync-master-sheet.php', 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', @@ -125,6 +130,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) ], [ + 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wooproducttable.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', @@ -133,6 +139,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Ok, Start Now!', ], [ + 'plugin_id' => 'ultraaddons-elementor-lite/init.php', 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', @@ -141,6 +148,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Get it Now', ], [ + 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', 'title' => 'Sheet to Table Live Sync for Google Sheet', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', @@ -149,6 +157,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Free Download Now', ], [ + 'plugin_id' => 'wc-quantity-plus-minus-button/wc-quantity-plus-minus-button.php', 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', @@ -157,6 +166,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Free Download Now', ], [ + 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', @@ -165,6 +175,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Free Download Now', ], [ + 'plugin_id' => 'woo-product-table/woo-product-table.php', 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', @@ -173,6 +184,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Checkout our Plugins', ], [ + 'plugin_id' => 'woo-product-table/woo-product-table.php', 'title' => 'Get all Free Plugins for WooCommrce', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', From 2197f9cdaf5d8fb6a3d81db7b97923e2c1a47dc6 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 16:23:10 +0600 Subject: [PATCH 14/34] working done --- assets/css/notice.css | 13 +++++++++++-- framework/handle.php | 8 ++++---- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/assets/css/notice.css b/assets/css/notice.css index 9edbf7ef..550c643a 100644 --- a/assets/css/notice.css +++ b/assets/css/notice.css @@ -61,9 +61,11 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { .notice.ca-notice.notice-offer .ca-msg-text p { font-size: 16px; padding: 0; - margin: 0; color: #607D8B; - /* margin-bottom: 10px; */ + margin: 0; + display: flex; + gap: 12px; + flex-flow: row wrap; } .anywhere-notice.ca-notice.notice-offer .ca-msg-text p{font-size: 20px;} .notice.ca-notice.notice-offer .ca-msg-text h1 { @@ -102,9 +104,16 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { clear: both; border: 0 none; color: #f5fff6; + white-space: nowrap; + display: inline-block; +} +.ca-msg-text { + width: 70%; } .ca-notice-content { gap: 25px; + flex-flow: row wrap-reverse; + align-items: center; } .anywhere-notice {} diff --git a/framework/handle.php b/framework/handle.php index b3585642..1cee44d0 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -157,7 +157,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Free Download Now', ], [ - 'plugin_id' => 'wc-quantity-plus-minus-button/wc-quantity-plus-minus-button.php', + 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', @@ -175,7 +175,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Free Download Now', ], [ - 'plugin_id' => 'woo-product-table/woo-product-table.php', + 'plugin_id' => 'codeastrology/all-plugins-premium', 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', @@ -184,13 +184,13 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Checkout our Plugins', ], [ - 'plugin_id' => 'woo-product-table/woo-product-table.php', + 'plugin_id' => 'codeastrology/all-plugins-free', 'title' => 'Get all Free Plugins for WooCommrce', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', - 'button_text' => 'Get it Now', + 'button_text' => 'Get it Free', ], ]; From 89dfc0eb5eef1eec6be826bd34c783dbd98fbcb4 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 16:49:12 +0600 Subject: [PATCH 15/34] working --- framework/handle.php | 165 +++++++++++++++++++++++++------------------ 1 file changed, 97 insertions(+), 68 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 1cee44d0..b14b5424 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -24,12 +24,6 @@ public function __construct() public static function fail() { - /** - * Getting help from configure - * $config = get_option( WPT_OPTION_KEY ); - $disable_plugin_noti = !isset( $config['disable_plugin_noti'] ) ? true : false; - */ - $r_slug = 'woocommerce/woocommerce.php'; $t_slug = WPT_PLUGIN_BASE_FILE; //'woo-product-table/woo-product-table.php'; $req_wc = new Require_Control($r_slug,$t_slug); @@ -68,6 +62,7 @@ public static function display_notice() if( time() > $last_date_timestamp ) return; + //eta sudhu matro amader selected plugin er kkhetre always ba all time show korbe add //Only when in product table page, So it will show always $s_id = $_SERVER['REQUEST_URI'] ?? ''; if( strpos( $s_id, 'product_table') !== false ){ @@ -81,6 +76,7 @@ public static function display_notice() return; } + return; /** * eTa muloto seisob kustomer er jonno * jara oofer message dekhe khub birokto hoyeche, eTa tader jonno. @@ -117,84 +113,117 @@ protected static function AllOfferWithOwnOffer( $probability = 5, $extra_for_id } protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) { + if( $probability !== 5 ) return; $fullArgs = [ [ - 'plugin_id' => 'product-sync-master-sheet/product-sync-master-sheet.php', - 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', - 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', - 'button_text' => 'Start to Sync with Google Sheets', - ], - - [ - 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', - 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://wooproducttable.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', - 'message' => 'Offers to display specific products with minimum, maximum quantity.', - 'button_text' => 'Ok, Start Now!', - ], - [ - 'plugin_id' => 'ultraaddons-elementor-lite/init.php', - 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', - 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', - 'button_text' => 'Get it Now', - ], - [ - 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', - 'title' => 'Sheet to Table Live Sync for Google Sheet', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', - 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', - 'message' => 'Live Google Sheet Sync, Smart Caching for Instant Loading, Show Sheen your site by Shortcode.', - 'button_text' => 'Free Download Now', - ], - [ - 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', - 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', + 'plugin_id' => 'woo-product-table/woo-product-table.php', + 'title' => 'Woo Product Table - Product Table for WooCommerce by CodeAstrology', 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', - 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', - 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', + 'target_url' => 'https://wordpress.org/plugins/woo-product-table/', + 'img_url' => WPT_BASE_URL. 'assets/images/round-logo.png', + 'message' => 'Helps you to display your products in a searchable table layout with filters.', 'button_text' => 'Free Download Now', + 'coupon_show_bool' => false, ], [ - 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', - 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', + 'plugin_id' => 'woo-product-table-pro/woo-product-table-pro.php', + 'title' => 'Woo Product Table Pro - Product Table for WooCommerce by CodeAstrology', 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', - 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', - 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', + 'target_url' => 'https://wooproducttable.com/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/round-logo.png', + 'message' => 'Helps you to display your products in a searchable table layout with filters.', 'button_text' => 'Free Download Now', + 'coupon_show_bool' => true, ], + + [ - 'plugin_id' => 'codeastrology/all-plugins-premium', - 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', - 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', - 'button_text' => 'Checkout our Plugins', - ], - [ - 'plugin_id' => 'codeastrology/all-plugins-free', - 'title' => 'Get all Free Plugins for WooCommrce', + 'plugin_id' => 'product-sync-master-sheet-premium/init.php', + 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)', 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', - 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', - 'button_text' => 'Get it Free', + 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', + 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', + 'button_text' => 'Start to Sync with Google Sheets', ], + + // [ + // 'plugin_id' => 'WC_Min_Max_Quantity/wcmmq.php', + // 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://codeastrology.com/min-max-quantity/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + // 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', + // 'message' => 'Offers to display specific products with minimum, maximum quantity.', + // 'button_text' => 'Ok, Test It', + // ], + // [ + // 'plugin_id' => 'ultraaddons-elementor-lite/init.php', + // 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + // 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', + // 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', + // 'button_text' => 'Get it Now', + // ], + // [ + // 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', + // 'title' => 'Sheet to Table Live Sync for Google Sheet', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', + // 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', + // 'message' => 'Live Google Sheet Sync, Smart Caching for Instant Loading, Show Sheen your site by Shortcode.', + // 'button_text' => 'Free Download Now', + // ], + // [ + // 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', + // 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + // 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', + // 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', + // 'button_text' => 'Free Download Now', + // ], + // [ + // 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', + // 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + // 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', + // 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', + // 'button_text' => 'Free Download Now', + // ], + // [ + // 'plugin_id' => 'codeastrology/all-plugins-premium', + // 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + // 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + // 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + // 'button_text' => 'Checkout our Plugins', + // ], + // [ + // 'plugin_id' => 'codeastrology/all-plugins-free', + // 'title' => 'Get all Free Plugins for WooCommrce', + // 'coupon_code' => 'BLACKFRIDAY2024', + // 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + // 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + // 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + // 'button_text' => 'Get it Free', + // ], ]; + + // if(isset(self::$current_plugin_ids) && !empty(self::$current_plugin_ids)){ + // //If found $current_plugin_ids any value from $fullArgs['plugin_id'] then remove it from $fullArgs array. + // $fullArgs = array_filter($fullArgs, function($item) { + // return !in_array($item['plugin_id'], self::$current_plugin_ids); + // }); + + // } + // dd(self::$current_plugin_ids); + $arr_index = rand(0, count($fullArgs) - 1); $rand_args = $fullArgs[$arr_index]; self::GetCustomOffer( $rand_args, $arr_index, $extra_for_id ); From 5b06e9c25bc57c93d78bcd1ca59b40ead0cef67f Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 18:05:56 +0600 Subject: [PATCH 16/34] notice finally done --- framework/handle.php | 197 ++++++++++++++++++++++++++----------------- 1 file changed, 118 insertions(+), 79 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index b14b5424..8f43dbe6 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -76,7 +76,6 @@ public static function display_notice() return; } - return; /** * eTa muloto seisob kustomer er jonno * jara oofer message dekhe khub birokto hoyeche, eTa tader jonno. @@ -84,7 +83,7 @@ public static function display_notice() * add_filter('wpt_offer_show', '__return_false'); * taholei offer showing off hoye jabe. */ - $temp_numb = rand(4,5); + $temp_numb = rand(2,8); if( defined( 'WPT_PRO_DEV_VERSION' ) ){ self::OtherOffer( $temp_numb); return; @@ -105,7 +104,7 @@ protected static function AllOfferWithOwnOffer( $probability = 5, $extra_for_id $extra_for_id = $extra_for_id ? $extra_for_id : ''; $this_rand = rand(1,9); - if( $this_rand <= 3 ){ + if( $this_rand <= 0 ){ self::Notice( $probability); }else{ self::OtherOffer( $probability, $extra_for_id); @@ -133,7 +132,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'target_url' => 'https://wooproducttable.com/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => WPT_BASE_URL. 'assets/images/round-logo.png', 'message' => 'Helps you to display your products in a searchable table layout with filters.', - 'button_text' => 'Free Download Now', + 'button_text' => 'Get with Exclusive Features', 'coupon_show_bool' => true, ], @@ -148,83 +147,119 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'button_text' => 'Start to Sync with Google Sheets', ], - // [ - // 'plugin_id' => 'WC_Min_Max_Quantity/wcmmq.php', - // 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://codeastrology.com/min-max-quantity/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - // 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', - // 'message' => 'Offers to display specific products with minimum, maximum quantity.', - // 'button_text' => 'Ok, Test It', - // ], - // [ - // 'plugin_id' => 'ultraaddons-elementor-lite/init.php', - // 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - // 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', - // 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', - // 'button_text' => 'Get it Now', - // ], - // [ - // 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', - // 'title' => 'Sheet to Table Live Sync for Google Sheet', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', - // 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', - // 'message' => 'Live Google Sheet Sync, Smart Caching for Instant Loading, Show Sheen your site by Shortcode.', - // 'button_text' => 'Free Download Now', - // ], - // [ - // 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', - // 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', - // 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', - // 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', - // 'button_text' => 'Free Download Now', - // ], - // [ - // 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', - // 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', - // 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', - // 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', - // 'button_text' => 'Free Download Now', - // ], - // [ - // 'plugin_id' => 'codeastrology/all-plugins-premium', - // 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - // 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', - // 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', - // 'button_text' => 'Checkout our Plugins', - // ], - // [ - // 'plugin_id' => 'codeastrology/all-plugins-free', - // 'title' => 'Get all Free Plugins for WooCommrce', - // 'coupon_code' => 'BLACKFRIDAY2024', - // 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - // 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', - // 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', - // 'button_text' => 'Get it Free', - // ], + [ + 'plugin_id' => 'product-sync-master-sheet/product-sync-master-sheet.php', + 'title' => 'Sync master sheet - Edit,Update, Stock Sync from Google Sheet also from another Website', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', + 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', + 'button_text' => 'Free Download Now', + 'coupon_show_bool' => false, + ], + + + [ + 'plugin_id' => 'WC_Min_Max_Quantity/wcmmq.php', + 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/min-max-quantity/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', + 'message' => 'Offers to display specific products with minimum, maximum quantity.', + 'button_text' => 'Ok, Test It', + ], + [ + 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', + 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', + 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', + 'button_text' => 'Free Download Now', + ], + + + [ + 'plugin_id' => 'ultraaddons-elementor-lite/init.php', + 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', + 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', + 'button_text' => 'Get it Now', + ], + [ + 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', + 'title' => 'Sheet to Table Live Sync for Google Sheet', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', + 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', + 'message' => 'Show Google Sheet by Shortcode, Anywhere. Live Sync Google Sheet, Smart Caching for Instant Loading.', + 'button_text' => 'Free Download Now', + ], + [ + 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', + 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', + 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', + 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', + 'button_text' => 'Free Download Now', + ], + + [ + 'plugin_id' => 'codeastrology/all-plugins-premium', + 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + 'button_text' => 'Checkout our Plugins', + ], + [ + 'plugin_id' => 'codeastrology/all-plugins-free', + 'title' => 'Get all Free Plugins for WooCommrce', + 'coupon_code' => 'BLACKFRIDAY2024', + 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', + 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', + 'button_text' => 'Get it Free', + ], ]; - - // if(isset(self::$current_plugin_ids) && !empty(self::$current_plugin_ids)){ - // //If found $current_plugin_ids any value from $fullArgs['plugin_id'] then remove it from $fullArgs array. - // $fullArgs = array_filter($fullArgs, function($item) { - // return !in_array($item['plugin_id'], self::$current_plugin_ids); - // }); + //Array Filter with this own plugn's id. self::$current_plugin_ids + if(isset(self::$current_plugin_ids) && !empty(self::$current_plugin_ids)){ + //If found $current_plugin_ids any value from $fullArgs['plugin_id'] then remove it from $fullArgs array. + $fullArgs = array_filter($fullArgs, function($item) { + if(! isset($item['plugin_id'])) return true; + + $plugin_id = $item['plugin_id']; + return !in_array($plugin_id, self::$current_plugin_ids); + }); + + } + + $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); + //Now I would like to filter $fullArgs array with active plugins actually if found $fullArgs['plugin_id'] then remove it from $fullArgs array. + $fullArgs = array_filter($fullArgs, function($item) use ($active_plugins) { + if(! isset($item['plugin_id'])) return true; - // } - // dd(self::$current_plugin_ids); + $plugin_id = $item['plugin_id']; + return !in_array($plugin_id, $active_plugins); + }); - $arr_index = rand(0, count($fullArgs) - 1); + + + //Finally rearrange with new index 0,1,2,3,4,5,6,7,8,9 + $fullArgs = array_values($fullArgs); + + //sob check korar por jodi empty hoy, taile null return kore dibo + if(empty($fullArgs)) return; + + $count = count($fullArgs); + $arr_index = rand(0, $count - 1); + $rand_args = $fullArgs[$arr_index]; self::GetCustomOffer( $rand_args, $arr_index, $extra_for_id ); @@ -255,12 +290,16 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' } $title = $args['title'] ?? 'BLACKFRIDAY2024 OFFER for Woo Product Table'; - $notice_id = 'wpt_'.$coupon_code.'_offer'; - if( $arr_index !== false ) $notice_id = 'wpt_'.$coupon_code.'_offer_' . $arr_index; + $plugin_id = $args['plugin_id'] ?? ''; + // Remove '/' and '.php' + $cleaned_plugin_id = str_replace(['/', '.php'], '', $plugin_id); + $cleaned_plugin_id = substr($cleaned_plugin_id, 0, 30); + $notice_id = 'wpt_'.$coupon_code . $cleaned_plugin_id; + if( $arr_index !== false ) $notice_id = $notice_id . '_' . $arr_index; if( ! empty( $extra_for_id ) ) $notice_id = $notice_id . '_' . $extra_for_id; $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) - ->set_diff_limit(4) + ->set_diff_limit(5) ->set_type('offer') ->set_img( $img_url) ->set_img_target( $target ) From 18d5f397f52916feddd9ba78ad45696d0291d69a Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 18:08:09 +0600 Subject: [PATCH 17/34] change log and version --- readme.txt | 4 ++-- woo-product-table.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index ea9377b8..af316fe7 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://donate.stripe.com/4gw2bB2Pzdjd8mYfYZ Tags: wc product table, woo table, woo product table,woocommerce product table, product table Requires at least: 4.0.0 Tested up to: 6.7.1 -Stable tag: 3.5.3 +Stable tag: 3.5.4 Requires PHP: 5.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -333,7 +333,7 @@ You can easily show specific category products. While creating new table click o == Changelog == -= 3.5.3 = += 3.5.4 & 3.5.3 = * Added: two new action hook added 'wpt_load', 'wpt_loaded'. * Compatibility check with latest WooCommerce version. * Compatibility check with latest WordPress version. diff --git a/woo-product-table.php b/woo-product-table.php index 74c3635c..aa1229cb 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -8,7 +8,7 @@ * Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version * Tags: wooproducttable, woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table * - * Version: 3.5.3 + * Version: 3.5.4 * Requires at least: 4.0.0 * Tested up to: 6.7.1 * WC requires at least: 5.0.0 @@ -34,7 +34,7 @@ } if( ! defined( 'WPT_DEV_VERSION' ) ){ - define( 'WPT_DEV_VERSION', '3.5.3.0' ); + define( 'WPT_DEV_VERSION', '3.5.4.0' ); } if( ! defined( 'WPT_CAPABILITY' ) ){ From a78d98ba2e7605db8be2f6fe700df85b0373a0c1 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 18:22:20 +0600 Subject: [PATCH 18/34] finally done actually --- framework/handle.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 8f43dbe6..6fb1c93d 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -61,16 +61,16 @@ public static function display_notice() if( time() > $last_date_timestamp ) return; - + $temp_numb = rand(4,5); //eta sudhu matro amader selected plugin er kkhetre always ba all time show korbe add //Only when in product table page, So it will show always $s_id = $_SERVER['REQUEST_URI'] ?? ''; if( strpos( $s_id, 'product_table') !== false ){ if( defined( 'WPT_PRO_DEV_VERSION' ) ){ - self::OtherOffer(5, $s_id); + self::OtherOffer($temp_numb, $s_id); return; }else{ - self::AllOfferWithOwnOffer(5, $s_id); + self::AllOfferWithOwnOffer($temp_numb, $s_id); } return; @@ -292,11 +292,15 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' $title = $args['title'] ?? 'BLACKFRIDAY2024 OFFER for Woo Product Table'; $plugin_id = $args['plugin_id'] ?? ''; // Remove '/' and '.php' + + $extra_for_id = str_replace(['/','&','.','edit','wp-admin', 'php', '=','post_type', '?'], '', $extra_for_id); + $extra_for_id = preg_replace('/[^a-zA-Z]/', '', $extra_for_id); $cleaned_plugin_id = str_replace(['/', '.php'], '', $plugin_id); - $cleaned_plugin_id = substr($cleaned_plugin_id, 0, 30); + $cleaned_plugin_id = substr($cleaned_plugin_id, 0, 20); $notice_id = 'wpt_'.$coupon_code . $cleaned_plugin_id; if( $arr_index !== false ) $notice_id = $notice_id . '_' . $arr_index; if( ! empty( $extra_for_id ) ) $notice_id = $notice_id . '_' . $extra_for_id; + update_option( 'wpt_offer_index_saiful_checking', $notice_id ); $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) ->set_diff_limit(5) From d910ebafe3125661fefe80b19f494f8462ff3dad Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Wed, 4 Dec 2024 18:59:53 +0600 Subject: [PATCH 19/34] coupon code changed --- admin/page/premium-link-header.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/admin/page/premium-link-header.php b/admin/page/premium-link-header.php index d27b24ea..df83d129 100644 --- a/admin/page/premium-link-header.php +++ b/admin/page/premium-link-header.php @@ -6,7 +6,7 @@
@@ -15,12 +15,12 @@

Checkout our Offer.

- + Money Back Guarantee

100% No-Risk 30-Days Money Back Guarantee

From c59b6c2a713ee7a0e7d1751fd19a9bf2be232ad7 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 10:05:47 +0600 Subject: [PATCH 20/34] working --- framework/handle.php | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 6fb1c93d..abc5ef8d 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -10,11 +10,7 @@ class WPT_Required { - public static $coupon_Code; - public static $current_plugin_ids = [ - 'woo-product-table/woo-product-table.php', - 'woo-product-table-pro/woo-product-table-pro.php' - ]; + public static $coupon_code; public static $stop_next = 0; public function __construct() @@ -228,17 +224,6 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) ]; - //Array Filter with this own plugn's id. self::$current_plugin_ids - if(isset(self::$current_plugin_ids) && !empty(self::$current_plugin_ids)){ - //If found $current_plugin_ids any value from $fullArgs['plugin_id'] then remove it from $fullArgs array. - $fullArgs = array_filter($fullArgs, function($item) { - if(! isset($item['plugin_id'])) return true; - - $plugin_id = $item['plugin_id']; - return !in_array($plugin_id, self::$current_plugin_ids); - }); - - } $active_plugins = apply_filters( 'active_plugins', get_option( 'active_plugins', array() ) ); //Now I would like to filter $fullArgs array with active plugins actually if found $fullArgs['plugin_id'] then remove it from $fullArgs array. From 7a58d31957cea10a8326d8c6d1c3c959b1a760eb Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 10:06:24 +0600 Subject: [PATCH 21/34] img url changed --- framework/handle.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index abc5ef8d..1b9b7e1d 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -160,7 +160,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://codeastrology.com/min-max-quantity/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/woo-min-max-quantity-step-control-single.png', + 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-256x256.png', 'message' => 'Offers to display specific products with minimum, maximum quantity.', 'button_text' => 'Ok, Test It', ], @@ -169,7 +169,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', 'coupon_code' => 'BLACKFRIDAY2024', 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', - 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-128x128.png', + 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-256x256.png', 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', 'button_text' => 'Free Download Now', ], From d1782304a06adf3000a33399b54018c0a4f133f2 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 10:40:29 +0600 Subject: [PATCH 22/34] fixed Noticed --- framework/handle.php | 51 ++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 25 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 1b9b7e1d..f075eb8b 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -10,7 +10,8 @@ class WPT_Required { - public static $coupon_code; + public static $coupon_code = 'BLACKFRIDAY2024'; + public static $last_date = '31 Dec 2024'; public static $stop_next = 0; public function __construct() @@ -79,7 +80,7 @@ public static function display_notice() * add_filter('wpt_offer_show', '__return_false'); * taholei offer showing off hoye jabe. */ - $temp_numb = rand(2,8); + $temp_numb = rand(1,9); if( defined( 'WPT_PRO_DEV_VERSION' ) ){ self::OtherOffer( $temp_numb); return; @@ -100,7 +101,7 @@ protected static function AllOfferWithOwnOffer( $probability = 5, $extra_for_id $extra_for_id = $extra_for_id ? $extra_for_id : ''; $this_rand = rand(1,9); - if( $this_rand <= 0 ){ + if( $this_rand <= 3 ){ self::Notice( $probability); }else{ self::OtherOffer( $probability, $extra_for_id); @@ -114,9 +115,9 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'woo-product-table/woo-product-table.php', 'title' => 'Woo Product Table - Product Table for WooCommerce by CodeAstrology', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wordpress.org/plugins/woo-product-table/', - 'img_url' => WPT_BASE_URL. 'assets/images/round-logo.png', + 'img_url' => 'https://ps.w.org/woo-product-table/assets/icon-256x256.png', 'message' => 'Helps you to display your products in a searchable table layout with filters.', 'button_text' => 'Free Download Now', 'coupon_show_bool' => false, @@ -124,9 +125,9 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'woo-product-table-pro/woo-product-table-pro.php', 'title' => 'Woo Product Table Pro - Product Table for WooCommerce by CodeAstrology', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wooproducttable.com/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/round-logo.png', + 'img_url' => 'https://ps.w.org/woo-product-table/assets/icon-256x256.png', 'message' => 'Helps you to display your products in a searchable table layout with filters.', 'button_text' => 'Get with Exclusive Features', 'coupon_show_bool' => true, @@ -136,9 +137,9 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'product-sync-master-sheet-premium/init.php', 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', + 'img_url' => 'https://ps.w.org/product-sync-master-sheet/assets/icon-256x256.png', 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', 'button_text' => 'Start to Sync with Google Sheets', ], @@ -146,9 +147,9 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'product-sync-master-sheet/product-sync-master-sheet.php', 'title' => 'Sync master sheet - Edit,Update, Stock Sync from Google Sheet also from another Website', - 'coupon_code' => 'BLACKFRIDAY2024', - 'target_url' => 'https://codeastrology.com/downloads/product-sync-master-sheet-premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/products/product-sync-master-sheet.png', + 'coupon_code' => self::$coupon_code, + 'target_url' => 'https://wordpress.org/plugins/product-sync-master-sheet/', + 'img_url' => 'https://ps.w.org/product-sync-master-sheet/assets/icon-256x256.png', 'message' => 'Seamlessly connect your WooCommerce store with Google Sheets via the Google Sheets API. Also sync with multiple website.', 'button_text' => 'Free Download Now', 'coupon_show_bool' => false, @@ -158,7 +159,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'WC_Min_Max_Quantity/wcmmq.php', 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://codeastrology.com/min-max-quantity/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-256x256.png', 'message' => 'Offers to display specific products with minimum, maximum quantity.', @@ -167,7 +168,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'woo-min-max-quantity-step-control-single/wcmmq.php', 'title' => 'Min Max Control - Min Max Quantity & Step Control for WooCommerce', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', 'img_url' => 'https://ps.w.org/woo-min-max-quantity-step-control-single/assets/icon-256x256.png', 'message' => 'Min Max Control - offers to set product minimum & maximum quantity and step.', @@ -178,7 +179,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'ultraaddons-elementor-lite/init.php', 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://ultraaddons.com/pricing/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => WPT_BASE_URL. 'assets/images/products/ultraaddons-elementor-lite.png', 'message' => 'Give Floating Effects For Animations. Now you can create stunning floating animation using UltraAddons exclusive floating feature', @@ -187,16 +188,16 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'sheet-to-wp-table-for-google-sheet/sheet-to-wp-table-for-google-sheet.php', 'title' => 'Sheet to Table Live Sync for Google Sheet', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wordpress.org/plugins/sheet-to-wp-table-for-google-sheet/', 'img_url' => 'https://s.w.org/plugins/geopattern-icon/sheet-to-wp-table-for-google-sheet.svg', - 'message' => 'Show Google Sheet by Shortcode, Anywhere. Live Sync Google Sheet, Smart Caching for Instant Loading.', + 'message' => 'Show your Google Sheet by Shortcode, Anywhere of your site. Live Sync Google Sheet, Smart Caching for Instant Loading.', 'button_text' => 'Free Download Now', ], [ 'plugin_id' => 'wc-quantity-plus-minus-button/init.php', 'title' => 'Quantity Plus Minus Button for WooCommerce by CodeAstrology', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wordpress.org/plugins/wc-quantity-plus-minus-button/', 'img_url' => 'https://ps.w.org/wc-quantity-plus-minus-button/assets/icon-128x128.png', 'message' => 'Add Quantity Plus Minus Button to your Product page and Shop Page for WooCommerce.', @@ -206,18 +207,18 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) [ 'plugin_id' => 'codeastrology/all-plugins-premium', 'title' => 'BLACKFRIDAY - CodeAstrology all plugins', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://codeastrology.com/downloads/category/premium/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + 'img_url' => 'https://i0.wp.com/codeastrology.com/wp-content/uploads/2022/02/Code-Astrology-animated-logo-1.gif', 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', 'button_text' => 'Checkout our Plugins', ], [ 'plugin_id' => 'codeastrology/all-plugins-free', 'title' => 'Get all Free Plugins for WooCommrce', - 'coupon_code' => 'BLACKFRIDAY2024', + 'coupon_code' => self::$coupon_code, 'target_url' => 'https://codeastrology.com/downloads/category/free-products/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', - 'img_url' => WPT_BASE_URL. 'assets/images/brand/animated-logo.gif', + 'img_url' => 'https://i0.wp.com/codeastrology.com/wp-content/uploads/2022/02/Code-Astrology-animated-logo-1.gif', 'message' => 'Control WooCommerce products to Show as Table, To Sync with Google Sheet, to control quantity with minimum, maximum quantity.', 'button_text' => 'Get it Free', ], @@ -236,7 +237,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) - //Finally rearrange with new index 0,1,2,3,4,5,6,7,8,9 + //Finally rearrange with new index 0,1,2,3,4,5,6,7,8,9 and so on | Specially for reindexing $fullArgs = array_values($fullArgs); //sob check korar por jodi empty hoy, taile null return kore dibo @@ -263,7 +264,7 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' */ $coupon_code = $args['coupon_code'] ?? 'BLACKFRIDAY2024'; $target = $args['target_url'] ?? 'https://wooproducttable.com/pricing/?discount=' . $coupon_code . '&campaign=' . $coupon_code . '&ref=1&utm_source=Default_Offer_LINK'; - $img_url = $args['img_url'] ?? WPT_BASE_URL. 'assets/images/round-logo.png'; + $img_url = $args['img_url'] ?? ''; $button_text = $args['button_text'] ?? 'Claim Discount'; $coupon_show_bool = $args['coupon_show_bool'] ?? true; if( $button_text === 'Free Download Now' ){ @@ -300,7 +301,7 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' ]); $offerNc->add_button([ - 'text' => 'Free Plugins', + 'text' => 'WordPress.org All Plugin', 'type' => 'warning', 'link' => 'https://profiles.wordpress.org/codersaiful/#content-plugins', ]); From e4eab15d2452e983498342571d85eba8b85d2246 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 10:45:34 +0600 Subject: [PATCH 23/34] done --- framework/handle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/handle.php b/framework/handle.php index f075eb8b..0ec147fa 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -286,7 +286,7 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' $notice_id = 'wpt_'.$coupon_code . $cleaned_plugin_id; if( $arr_index !== false ) $notice_id = $notice_id . '_' . $arr_index; if( ! empty( $extra_for_id ) ) $notice_id = $notice_id . '_' . $extra_for_id; - update_option( 'wpt_offer_index_saiful_checking', $notice_id ); + $offerNc = new Notice($notice_id); $offerNc->set_title( $title ) ->set_diff_limit(5) From 357d666c7a8867254fc17f582af539a3a0dad09a Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 11:42:55 +0600 Subject: [PATCH 24/34] working done --- framework/handle.php | 42 ++++++++++-------------------------------- 1 file changed, 10 insertions(+), 32 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 0ec147fa..e391e290 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -12,11 +12,12 @@ class WPT_Required public static $coupon_code = 'BLACKFRIDAY2024'; public static $last_date = '31 Dec 2024'; + public static $PRO_DEV_VERSION; public static $stop_next = 0; public function __construct() { - + self::$PRO_DEV_VERSION = defined( 'WPT_PRO_DEV_VERSION' ); } public static function fail() { @@ -35,7 +36,6 @@ public static function fail() if( ! $req_wc_next ){ self::display_notice(); - // self::display_common_notice(); } return self::$stop_next; @@ -50,10 +50,10 @@ public static function display_notice() { if( ! is_admin() ) return; - $return_true = apply_filters( 'wpt_offer_show', true ); + $return_true = apply_filters( 'wpt_offer_show_all', true ); if( !$return_true ) return; - $last_date = '31 Dec 2024'; //Last date string to show offer + $last_date = self::$last_date; //Last date string to show offer $last_date_timestamp = strtotime( $last_date ); if( time() > $last_date_timestamp ) return; @@ -63,7 +63,7 @@ public static function display_notice() //Only when in product table page, So it will show always $s_id = $_SERVER['REQUEST_URI'] ?? ''; if( strpos( $s_id, 'product_table') !== false ){ - if( defined( 'WPT_PRO_DEV_VERSION' ) ){ + if( self::$PRO_DEV_VERSION ){ self::OtherOffer($temp_numb, $s_id); return; }else{ @@ -73,6 +73,10 @@ public static function display_notice() return; } + + $return_true = apply_filters( 'wpt_offer_show', true ); + if( !$return_true ) return; + /** * eTa muloto seisob kustomer er jonno * jara oofer message dekhe khub birokto hoyeche, eTa tader jonno. @@ -81,7 +85,7 @@ public static function display_notice() * taholei offer showing off hoye jabe. */ $temp_numb = rand(1,9); - if( defined( 'WPT_PRO_DEV_VERSION' ) ){ + if( self::$PRO_DEV_VERSION ){ self::OtherOffer( $temp_numb); return; } @@ -333,32 +337,6 @@ protected static function Notice( $temp_numb) if($temp_numb == 5) $offerNc->show(); } - - /** - * Common Notice for Product table, where no need Pro version. - * - * @return void - */ - private static function display_common_notice() - { - return; - - /** - * Notice for UltraAddons - */ - if ( did_action( 'elementor/loaded' ) ) { - - $notc_ua = new Notice('ultraaddons'); - $notc_ua->set_message( sprintf( __( 'There is a special Widget for Product Table at %s. You can try it.', 'woo-product-table' ), "UltraAddons" ) ); - // ->add_button([ - // 'type' => 'warning', - // 'text' => __( 'Download UltraAddons Elementor', 'woo-product-table' ), - // 'link' => 'https://wordpress.org/plugins/ultraaddons-elementor-lite/' - // ]) - // $notc_ua->show(); - - } - } } } From 6441a30c253eccdd3c5be5878bf260ea19efff2d Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 13:31:20 +0600 Subject: [PATCH 25/34] done --- framework/handle.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index e391e290..1045cdf1 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -132,7 +132,7 @@ protected static function OtherOffer( $probability = 5, $extra_for_id = '' ) 'coupon_code' => self::$coupon_code, 'target_url' => 'https://wooproducttable.com/?discount=BLACKFRIDAY2024&campaign=BLACKFRIDAY2024&ref=1&utm_source=Default_Offer_LINK', 'img_url' => 'https://ps.w.org/woo-product-table/assets/icon-256x256.png', - 'message' => 'Helps you to display your products in a searchable table layout with filters.', + 'message' => 'Table for Variable Product, Table on Taxonomy/Category/Tag page, Custom Query, Query on any type taxonomy.', 'button_text' => 'Get with Exclusive Features', 'coupon_show_bool' => true, ], @@ -279,7 +279,7 @@ protected static function GetCustomOffer( $args = ['title' => '', 'coupon_code' $message .= '

Coupon Code: ' . $coupon_code . '

'; } - $title = $args['title'] ?? 'BLACKFRIDAY2024 OFFER for Woo Product Table'; + $title = $args['title'] ?? ''; $plugin_id = $args['plugin_id'] ?? ''; // Remove '/' and '.php' @@ -316,9 +316,9 @@ protected static function Notice( $temp_numb) { $coupon_Code = 'BLACKFRIDAY2024'; $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK'; - $my_message = 'Product Table Primium version on COUPON (Woo Product Table Pro) Plugin. Offer Upto 30 Sept. 2024'; + $my_message = 'Table for Variable Product, Table on Taxonomy/Category/Tag page, Custom Query, Query on any type taxonomy. '; $offerNc = new Notice('wpt_'.$coupon_Code.'_offer'); - $offerNc->set_title( 'BLACKFRIDAY2024 for Woo Product Table' ) + $offerNc->set_title( 'BLACKFRIDAY2024 for Woo Product Table (PRO)' ) ->set_diff_limit(5) ->set_type('offer') ->set_img( WPT_BASE_URL. 'assets/images/round-logo.png') From 7c5f504d5f75382ae83a4fbe64b5f43f7e87a32d Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Thu, 5 Dec 2024 13:39:02 +0600 Subject: [PATCH 26/34] notice updated transient set --- framework/ca-framework/app/notice.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/framework/ca-framework/app/notice.php b/framework/ca-framework/app/notice.php index b9421b71..b45f6449 100644 --- a/framework/ca-framework/app/notice.php +++ b/framework/ca-framework/app/notice.php @@ -199,6 +199,11 @@ public function show(){ if( ! is_admin() ) return; + //Same ID notice will not regen again within 30 seconds + $notice_right_now = get_transient( $this->notice_id . "_right_now" ); + if( $notice_right_now ) return; + set_transient( $this->notice_id . "_right_now", true, 10 ); + //Control End Date if( ! empty( $this->end_date ) && strtotime($this->end_date) < current_time( 'timestamp' ) ) return; From e9a363878e732449c8c15d39874e0b08b246b4bc Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sat, 7 Dec 2024 11:44:34 +0600 Subject: [PATCH 27/34] checking min max installed for temp_number genarate --- framework/handle.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/handle.php b/framework/handle.php index 1045cdf1..2d9c60e8 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -84,7 +84,8 @@ public static function display_notice() * add_filter('wpt_offer_show', '__return_false'); * taholei offer showing off hoye jabe. */ - $temp_numb = rand(1,9); + $rans_last_limt = defined('WC_MMQ_VERSION') ? 19 : 9; + $temp_numb = rand(1,$rans_last_limt); if( self::$PRO_DEV_VERSION ){ self::OtherOffer( $temp_numb); return; From 9bf24e311ff155fb7a7d5cb1f1a202e82cd6221b Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sat, 7 Dec 2024 14:00:11 +0600 Subject: [PATCH 28/34] notice css done --- assets/css/notice.css | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/assets/css/notice.css b/assets/css/notice.css index 550c643a..26c1f905 100644 --- a/assets/css/notice.css +++ b/assets/css/notice.css @@ -189,28 +189,28 @@ li#menu-posts-wpt_product_table.wp-has-current-submenu .wp-menu-name { /* black Friday offer */ -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] { /* background: #ffffff8f; */ color: #6e6e6e; box-shadow: 1px -1px 30px #0000000a; } -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a.ca-logo-link img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a.ca-logo-link img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] img, -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] a { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] a.ca-logo-link img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] a.ca-logo-link img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] img, +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] a { border: 0 none !important; } -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text h1 { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] .ca-msg-text h1 { color: #ff0000; font-size: 19px; } -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p>b:last-child { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] .ca-msg-text p>b:last-child { color: red; } -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p>b>i { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] .ca-msg-text p>b>i { color: #4CAF50; } -.notice.ca-notice.notice-offer[data-notice_id="wpt_20DAYSDEAL_offer"] .ca-msg-text p { +.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_offer"] .ca-msg-text p { padding-bottom: 5px; } From 35f761ee6c6f2c4238569d49c3d2cc797ce7a2b2 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sat, 7 Dec 2024 14:06:54 +0600 Subject: [PATCH 29/34] 'WPT_DEV_VERSION', '3.5.6.0' --- readme.txt | 6 +++++- woo-product-table.php | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/readme.txt b/readme.txt index af316fe7..3dce18c0 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://donate.stripe.com/4gw2bB2Pzdjd8mYfYZ Tags: wc product table, woo table, woo product table,woocommerce product table, product table Requires at least: 4.0.0 Tested up to: 6.7.1 -Stable tag: 3.5.4 +Stable tag: 3.5.6 Requires PHP: 5.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html @@ -333,6 +333,10 @@ You can easily show specific category products. While creating new table click o == Changelog == += 3.5.6 = +* Code Optimized +* Bug fixed + = 3.5.4 & 3.5.3 = * Added: two new action hook added 'wpt_load', 'wpt_loaded'. * Compatibility check with latest WooCommerce version. diff --git a/woo-product-table.php b/woo-product-table.php index aa1229cb..c2562a7d 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -8,11 +8,11 @@ * Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version * Tags: wooproducttable, woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table * - * Version: 3.5.4 + * Version: 3.5.6 * Requires at least: 4.0.0 * Tested up to: 6.7.1 * WC requires at least: 5.0.0 - * WC tested up to: 9.3.3 + * WC tested up to: 9.4.3 * * * Text Domain: woo-product-table @@ -34,7 +34,7 @@ } if( ! defined( 'WPT_DEV_VERSION' ) ){ - define( 'WPT_DEV_VERSION', '3.5.4.0' ); + define( 'WPT_DEV_VERSION', '3.5.6.0' ); } if( ! defined( 'WPT_CAPABILITY' ) ){ From 5f68ebf1a6749744a88892b90b74932552851bfc Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sat, 7 Dec 2024 14:13:16 +0600 Subject: [PATCH 30/34] offer show issue fixed --- framework/handle.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/framework/handle.php b/framework/handle.php index 2d9c60e8..b0b1f29b 100644 --- a/framework/handle.php +++ b/framework/handle.php @@ -14,8 +14,11 @@ class WPT_Required public static $last_date = '31 Dec 2024'; public static $PRO_DEV_VERSION; + public static $css_file_url; + public static $css_version = '1.0.0'; + public static $stop_next = 0; - public function __construct() + public static function initialize() { self::$PRO_DEV_VERSION = defined( 'WPT_PRO_DEV_VERSION' ); } @@ -53,6 +56,9 @@ public static function display_notice() $return_true = apply_filters( 'wpt_offer_show_all', true ); if( !$return_true ) return; + self::initialize(); + + $last_date = self::$last_date; //Last date string to show offer $last_date_timestamp = strtotime( $last_date ); @@ -73,7 +79,6 @@ public static function display_notice() return; } - $return_true = apply_filters( 'wpt_offer_show', true ); if( !$return_true ) return; From 64a43cd3ea250eb26ec56ae00f3bddf59547a714 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 15 Dec 2024 13:09:59 +0600 Subject: [PATCH 31/34] version and changlog updated --- assets/js/custom.js | 7 +++++++ readme.txt | 5 +++++ woo-product-table.php | 4 ++-- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index 3fda938a..3d34d79f 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -2259,9 +2259,13 @@ jQuery(function($) { */ function textToIntForSorting(text){ text = text.replace(/[^0-9.]/g,''); + text = parseFloat(text); if(text == ''){ text = 0; } + + text = text * 10000000; + text = parseInt(text); return text; } @@ -2339,7 +2343,9 @@ jQuery(function($) { text = $.trim(text); if(content_type == 'price'){ text = $(this).find('span.woocommerce-Price-amount.amount').last().text(); + // console.log(text); text = textToIntForSorting(text); + // console.log(text); }else if(content_type == 'number'){ @@ -2350,6 +2356,7 @@ jQuery(function($) { text = text + "_" + product_id; } + // console.log(text); var thisRowObject = $('#table_id_'+ temp_number +' #product_id_' + product_id); html = thisRowObject.prop('outerHTML'); //get_val is actually generated value diff --git a/readme.txt b/readme.txt index 3dce18c0..c2ab3c66 100644 --- a/readme.txt +++ b/readme.txt @@ -333,6 +333,11 @@ You can easily show specific category products. While creating new table click o == Changelog == += 3.5.7 = +* Fixed: Table column's number sorting issue for floating number has been fixed. +* Code Optimized +* Bug fixed + = 3.5.6 = * Code Optimized * Bug fixed diff --git a/woo-product-table.php b/woo-product-table.php index c2562a7d..2b73b63e 100644 --- a/woo-product-table.php +++ b/woo-product-table.php @@ -8,7 +8,7 @@ * Author URI: https://wooproducttable.com/?utm_source=WPT+Plugin+Dashboard&utm_medium=Free+Version * Tags: wooproducttable, woocommerce product list,woocommerce product table, wc product table, product grid view, inventory, shop product table * - * Version: 3.5.6 + * Version: 3.5.7 * Requires at least: 4.0.0 * Tested up to: 6.7.1 * WC requires at least: 5.0.0 @@ -34,7 +34,7 @@ } if( ! defined( 'WPT_DEV_VERSION' ) ){ - define( 'WPT_DEV_VERSION', '3.5.6.0' ); + define( 'WPT_DEV_VERSION', '3.5.7.0' ); } if( ! defined( 'WPT_CAPABILITY' ) ){ From dd2f55db88d2ff5b68490da662b61c6e6025b067 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 15 Dec 2024 13:10:18 +0600 Subject: [PATCH 32/34] 3.5.7 --- readme.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index c2ab3c66..27887049 100644 --- a/readme.txt +++ b/readme.txt @@ -4,7 +4,7 @@ Donate link: https://donate.stripe.com/4gw2bB2Pzdjd8mYfYZ Tags: wc product table, woo table, woo product table,woocommerce product table, product table Requires at least: 4.0.0 Tested up to: 6.7.1 -Stable tag: 3.5.6 +Stable tag: 3.5.7 Requires PHP: 5.4 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html From 79c0a9ce74acd88fd11afb8a6aa63df40f6931c9 Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 15 Dec 2024 13:19:44 +0600 Subject: [PATCH 33/34] done sorting issue --- assets/js/custom.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index 3d34d79f..d704a618 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -992,7 +992,7 @@ jQuery(function($) { targetAttributeObject['temp_number'] = temp_number; targetAttributeObject['table_id'] = temp_number; try{ - console.log(targetAttributeObject); + // console.log(targetAttributeObject); $(document.body).trigger('wpt_changed_variations',targetAttributeObject); }catch(error){ console.log("Variation ID not founded. To see error, Please console.log(error) here."); @@ -2264,9 +2264,10 @@ jQuery(function($) { text = 0; } - text = text * 10000000; + text = text * 100000; text = parseInt(text); + // console.log(text); return text; } From 3e114368620205f4004889597dc1f62209eacb6d Mon Sep 17 00:00:00 2001 From: Saiful Islam Date: Sun, 15 Dec 2024 13:46:12 +0600 Subject: [PATCH 34/34] comment fixed --- assets/js/custom.js | 1 - 1 file changed, 1 deletion(-) diff --git a/assets/js/custom.js b/assets/js/custom.js index d704a618..2c476f26 100644 --- a/assets/js/custom.js +++ b/assets/js/custom.js @@ -2267,7 +2267,6 @@ jQuery(function($) { text = text * 100000; text = parseInt(text); - // console.log(text); return text; }