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 {
+
-
?>
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
-
-
-
-
- |
-
-
- |
-
-
-
-
-
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
+
+
+ |
+
+
+ |
+
+
+
+
+
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 5e0529ff..3d800a88 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;
@@ -2053,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;
@@ -2218,14 +2130,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 +2384,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..26c1f905
--- /dev/null
+++ b/assets/css/notice.css
@@ -0,0 +1,219 @@
+
+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: 10px 25px !important;
+ border-radius: 9px;
+ box-shadow: 0 2px 10px #64646424;
+}
+.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;
+ color: #607D8B;
+ 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 {
+ color: red;
+ padding: 0;
+ margin: 0;
+ font-size: 22px;
+ text-transform: inherit;
+}
+.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 {
+ height: 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 {
+ color: #673AB7;
+ 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;
+ 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 {}
+
+.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_BLACKFRIDAY2024_offer"] {
+ /* background: #ffffff8f; */
+ color: #6e6e6e;
+ box-shadow: 1px -1px 30px #0000000a;
+}
+.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_BLACKFRIDAY2024_offer"] .ca-msg-text h1 {
+ color: #ff0000;
+ font-size: 19px;
+}
+.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_BLACKFRIDAY2024_offer"] .ca-msg-text p>b>i {
+ color: #4CAF50;
+}
+.notice.ca-notice.notice-offer[data-notice_id="wpt_BLACKFRIDAY2024_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/js/custom.js b/assets/js/custom.js
index 3fda938a..2c476f26 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.");
@@ -2259,9 +2259,13 @@ jQuery(function($) {
*/
function textToIntForSorting(text){
text = text.replace(/[^0-9.]/g,'');
+ text = parseFloat(text);
if(text == ''){
text = 0;
}
+
+ text = text * 100000;
+
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/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/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;
diff --git a/framework/handle.php b/framework/handle.php
index 442c3814..9752d9a4 100644
--- a/framework/handle.php
+++ b/framework/handle.php
@@ -9,20 +9,22 @@
class WPT_Required
{
+
+ public static $coupon_code = 'BLACKFRIDAY2024';
+ 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' );
}
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);
@@ -37,7 +39,6 @@ public static function fail()
if( ! $req_wc_next ){
self::display_notice();
- self::display_common_notice();
}
return self::$stop_next;
@@ -50,94 +51,299 @@ 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 = 'FLASH_SALE_2024';
- $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK';
- $my_message = 'Product Table Premium version on Sale
(Woo Product Table Pro) Plugin. Take it First!';
- $offerNc = new Notice('wpt_'.$coupon_Code.'_offer');
- $offerNc->set_title( 'FLASH SALE UP TO 70%' )
- ->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' => 'WordPress Plugins',
- 'link' => 'https://codeastrology.com/downloads/category/premium/'
- ]);
- if($temp_numb == 5) $offerNc->show();
+ if( ! is_admin() ) return;
+
+ $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 );
+
+ 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( self::$PRO_DEV_VERSION ){
+ self::OtherOffer($temp_numb, $s_id);
+ return;
+ }else{
+ self::AllOfferWithOwnOffer($temp_numb, $s_id);
+ }
+
+ 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.
+ *
+ * add_filter('wpt_offer_show', '__return_false');
+ * taholei offer showing off hoye jabe.
+ */
+ $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;
+ }
+ self::AllOfferWithOwnOffer( $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,9);
+ if( $this_rand <= 3 ){
+ self::Notice( $probability);
+ }else{
+ self::OtherOffer( $probability, $extra_for_id);
+ }
+ }
+ protected static function OtherOffer( $probability = 5, $extra_for_id = '' )
+ {
+
+ if( $probability !== 5 ) return;
+ $fullArgs = [
+ [
+ 'plugin_id' => 'woo-product-table/woo-product-table.php',
+ 'title' => 'Woo Product Table - Product Table for WooCommerce by CodeAstrology',
+ 'coupon_code' => self::$coupon_code,
+ 'target_url' => 'https://wordpress.org/plugins/woo-product-table/',
+ '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,
+ ],
+ [
+ 'plugin_id' => 'woo-product-table-pro/woo-product-table-pro.php',
+ 'title' => 'Woo Product Table Pro - Product Table for WooCommerce by CodeAstrology',
+ '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' => '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,
+ ],
+
+
+ [
+ 'plugin_id' => 'product-sync-master-sheet-premium/init.php',
+ 'title' => 'BLACKFRIDAY - Sync master sheet Premium (with Google Sheet)',
+ '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' => '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',
+ ],
+ [
+ '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' => 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,
+ ],
+ [
+ 'plugin_id' => 'WC_Min_Max_Quantity/wcmmq.php',
+ 'title' => 'BLACKFRIDAY Offer - Min Max Control (PRO)',
+ '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.',
+ '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' => 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.',
+ 'button_text' => 'Free Download Now',
+ ],
+
+
+ [
+ 'plugin_id' => 'ultraaddons-elementor-lite/init.php',
+ 'title' => 'BLACKFRIDAY Offer - UltraAddons Elementor PRO',
+ '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',
+ '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' => 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 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' => 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.',
+ 'button_text' => 'Free Download Now',
+ ],
+
+ [
+ 'plugin_id' => 'codeastrology/all-plugins-premium',
+ 'title' => 'BLACKFRIDAY - CodeAstrology all plugins',
+ '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' => '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' => 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' => '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',
+ ],
+
+ ];
+
+
+ $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;
+
+ $plugin_id = $item['plugin_id'];
+ return !in_array($plugin_id, $active_plugins);
+ });
+
+
+
+ //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
+ 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 );
+
+
}
- private static function display_notice_on_pro()
+ 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 = '' )
{
- $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)
+ /**
+ * 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'] ?? '';
+ $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'] ?? '';
+ $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, 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;
+
+ $offerNc = new Notice($notice_id);
+ $offerNc->set_title( $title )
+ ->set_diff_limit(5)
->set_type('offer')
- ->set_img( WPT_BASE_URL. 'assets/images/brand/social/web.png')
+ ->set_img( $img_url)
->set_img_target( $target )
- ->set_message( $my_message )
+ ->set_message( $message )
->add_button([
- 'text' => 'Get WooCommerce Product with Discount',
- 'type' => 'success',
+ 'text' => $button_text,
+ 'type' => 'offer',
'link' => $target,
]);
- if($temp_numb == 35) $offerNc->show();
- }
+ $offerNc->add_button([
+ 'text' => 'WordPress.org All Plugin',
+ 'type' => 'warning',
+ 'link' => 'https://profiles.wordpress.org/codersaiful/#content-plugins',
+ ]);
- /**
- * Common Notice for Product table, where no need Pro version.
- *
- * @return void
- */
- private static function display_common_notice()
+ $offerNc->show();
+ }
+ protected static function Notice( $temp_numb)
{
- return;
-
- /**
- * Notice for UltraAddons
- */
- if ( did_action( 'elementor/loaded' ) ) {
+ $coupon_Code = 'BLACKFRIDAY2024';
+ $target = 'https://wooproducttable.com/pricing/?discount=' . $coupon_Code . '&campaign=' . $coupon_Code . '&ref=1&utm_source=Default_Offer_LINK';
+ $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 (PRO)' )
+ ->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,
+ ]);
- $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();
+ $offerNc->add_button([
+ 'text' => 'Helpful WooCommerce Plugins',
+ 'link' => 'https://codeastrology.com/downloads/category/premium/?discount=' . $coupon_Code,
+ ]);
- }
+ if($temp_numb == 5) $offerNc->show();
}
}
}
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-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
+ $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' ) ){
diff --git a/readme.txt b/readme.txt
index 9c8f6b9c..10d11628 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.7.1
+Stable tag: 3.5.7
Requires PHP: 5.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -333,6 +333,30 @@ 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
+
+= 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.
+* Fixed: textdomain issue fixed on latest WordPress.
+* Bug fixed
+
+= 3.5.2 =
+* Fixed: fixed 'var_dump_table' security issue.
+* Bug fixed
+
+= 3.5.1 =
+* Fixed: Avada Form Entries table issue fixed.
+* Fixed: behaviour normal issue has been fixed.
+
= 3.5.0 =
* Fixed: Quote Request premium version issue fixed.
* Fixed: variation title issue fixed.
diff --git a/woo-product-table.php b/woo-product-table.php
index d23b0bfc..2b73b63e 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.7
* Requires at least: 4.0.0
- * Tested up to: 6.5.5
+ * Tested up to: 6.7.1
* WC requires at least: 5.0.0
- * WC tested up to: 9.0.2
+ * 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.0.0' );
+ define( 'WPT_DEV_VERSION', '3.5.7.0' );
}
if( ! defined( 'WPT_CAPABILITY' ) ){
@@ -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() {