Advanced Woo Search - Version 2.61

Version Description

( 2022-08-22 ) = * Update - Tested with WC 6.8 * Update - Custom Product Tabs for WooCommerce plugin integration

Download this release

Release Info

Developer Mihail Barinov
Plugin Icon 128x128 Advanced Woo Search
Version 2.61
Comparing to
See all releases

Code changes from version 2.60 to 2.61

advanced-woo-search.php CHANGED
@@ -3,12 +3,12 @@
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
- Version: 2.60
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
10
  WC requires at least: 3.0.0
11
- WC tested up to: 6.7.0
12
  */
13
 
14
 
@@ -96,7 +96,7 @@ final class AWS_Main {
96
  */
97
  private function define_constants() {
98
 
99
- $this->define( 'AWS_VERSION', '2.60' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
3
  /*
4
  Plugin Name: Advanced Woo Search
5
  Description: Advance ajax WooCommerce product search.
6
+ Version: 2.61
7
  Author: ILLID
8
  Author URI: https://advanced-woo-search.com/
9
  Text Domain: advanced-woo-search
10
  WC requires at least: 3.0.0
11
+ WC tested up to: 6.8.0
12
  */
13
 
14
 
96
  */
97
  private function define_constants() {
98
 
99
+ $this->define( 'AWS_VERSION', '2.61' );
100
 
101
  $this->define( 'AWS_DIR', plugin_dir_path( AWS_FILE ) );
102
  $this->define( 'AWS_URL', plugin_dir_url( AWS_FILE ) );
includes/class-aws-integrations.php CHANGED
@@ -374,6 +374,11 @@ if ( ! class_exists( 'AWS_Integrations' ) ) :
374
  include_once( AWS_DIR . '/includes/modules/class-aws-barn2-protected-categories.php' );
375
  }
376
 
 
 
 
 
 
377
  // Astra theme
378
  if ( 'Astra' === $this->current_theme ) {
379
  include_once( AWS_DIR . '/includes/modules/class-aws-astra.php' );
374
  include_once( AWS_DIR . '/includes/modules/class-aws-barn2-protected-categories.php' );
375
  }
376
 
377
+ // Custom Product Tabs for WooCommerce plugin
378
+ if ( class_exists('YIKES_Custom_Product_Tabs') || class_exists( 'YIKES_Custom_Product_Tabs_Pro' ) ) {
379
+ include_once( AWS_DIR . '/includes/modules/class-aws-custom-tabs.php' );
380
+ }
381
+
382
  // Astra theme
383
  if ( 'Astra' === $this->current_theme ) {
384
  include_once( AWS_DIR . '/includes/modules/class-aws-astra.php' );
includes/class-aws-table-data.php CHANGED
@@ -123,21 +123,6 @@ if ( ! class_exists( 'AWS_Table_Data' ) ) :
123
 
124
  }
125
 
126
- // Get content from Custom Product Tabs
127
- if ( $custom_tabs = get_post_meta( $data['id'], 'yikes_woo_products_tabs' ) ) {
128
- if ( $custom_tabs && ! empty( $custom_tabs ) ) {
129
- foreach( $custom_tabs as $custom_tab_array ) {
130
- if ( $custom_tab_array && ! empty( $custom_tab_array ) ) {
131
- foreach( $custom_tab_array as $custom_tab ) {
132
- if ( isset( $custom_tab['content'] ) && $custom_tab['content'] ) {
133
- $content = $content . ' ' . $custom_tab['content'];
134
- }
135
- }
136
- }
137
- }
138
- }
139
- }
140
-
141
  // WP 4.2 emoji strip
142
  if ( function_exists( 'wp_encode_emoji' ) ) {
143
  $content = wp_encode_emoji( $content );
123
 
124
  }
125
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  // WP 4.2 emoji strip
127
  if ( function_exists( 'wp_encode_emoji' ) ) {
128
  $content = wp_encode_emoji( $content );
includes/class-aws-table.php CHANGED
@@ -55,8 +55,6 @@ if ( ! class_exists( 'AWS_Table' ) ) :
55
 
56
  add_action( 'woocommerce_product_set_stock_status', array( $this, 'stock_status_changes' ), 10, 3 );
57
 
58
- add_action( 'updated_postmeta', array( $this, 'updated_custom_tabs' ), 10, 4 );
59
-
60
  add_action( 'wp_ajax_aws-reindex', array( $this, 'reindex_table_ajax' ) );
61
 
62
  add_action( 'aws_reindex_table', array( $this, 'reindex_table_job' ) );
@@ -612,19 +610,6 @@ if ( ! class_exists( 'AWS_Table' ) ) :
612
  }
613
  }
614
 
615
- /*
616
- * Custom Tabs was updated
617
- */
618
- public function updated_custom_tabs( $meta_id, $object_id, $meta_key, $meta_value ) {
619
-
620
- if ( $meta_key === 'yikes_woo_products_tabs' && apply_filters( 'aws_filter_yikes_woo_products_tabs_sync', true ) ) {
621
-
622
- $this->update_table( $object_id );
623
-
624
- }
625
-
626
- }
627
-
628
  /*
629
  * Re-index single product action
630
  */
55
 
56
  add_action( 'woocommerce_product_set_stock_status', array( $this, 'stock_status_changes' ), 10, 3 );
57
 
 
 
58
  add_action( 'wp_ajax_aws-reindex', array( $this, 'reindex_table_ajax' ) );
59
 
60
  add_action( 'aws_reindex_table', array( $this, 'reindex_table_job' ) );
610
  }
611
  }
612
 
 
 
 
 
 
 
 
 
 
 
 
 
 
613
  /*
614
  * Re-index single product action
615
  */
includes/modules/class-aws-custom-tabs.php ADDED
@@ -0,0 +1,94 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Custom Product Tabs for WooCommerce integration
5
+ */
6
+
7
+ if (!defined('ABSPATH')) {
8
+ exit; // Exit if accessed directly.
9
+ }
10
+
11
+ if (!class_exists('AWS_Custom_Tabs')) :
12
+
13
+ /**
14
+ * Class for main plugin functions
15
+ */
16
+ class AWS_Custom_Tabs {
17
+
18
+ /**
19
+ * @var AWS_Custom_Tabs The single instance of the class
20
+ */
21
+ protected static $_instance = null;
22
+
23
+ private $data = array();
24
+
25
+ /**
26
+ * Main AWS_Custom_Tabs Instance
27
+ *
28
+ * Ensures only one instance of AWS_Custom_Tabs is loaded or can be loaded.
29
+ *
30
+ * @static
31
+ * @return AWS_Custom_Tabs - Main instance
32
+ */
33
+ public static function instance()
34
+ {
35
+ if (is_null(self::$_instance)) {
36
+ self::$_instance = new self();
37
+ }
38
+ return self::$_instance;
39
+ }
40
+
41
+ /**
42
+ * Constructor
43
+ */
44
+ public function __construct() {
45
+
46
+ add_filter( 'aws_indexed_content', array( $this, 'aws_indexed_content'), 10, 3 );
47
+
48
+ add_action( 'updated_postmeta', array( $this, 'updated_custom_tabs' ), 10, 4 );
49
+
50
+ }
51
+
52
+ /*
53
+ * Index custom tabs content
54
+ */
55
+ public function aws_indexed_content( $content, $id, $product ) {
56
+
57
+ // Get content from Custom Product Tabs
58
+ if ( $custom_tabs = get_post_meta( $id, 'yikes_woo_products_tabs' ) ) {
59
+ if ( $custom_tabs && ! empty( $custom_tabs ) ) {
60
+ foreach( $custom_tabs as $custom_tab_array ) {
61
+ if ( is_array( $custom_tab_array ) && ! empty( $custom_tab_array ) ) {
62
+ foreach( $custom_tab_array as $custom_tab ) {
63
+ if ( isset( $custom_tab['content'] ) && $custom_tab['content'] ) {
64
+ $tab_content = $custom_tab['content'];
65
+ if ( function_exists( 'wp_encode_emoji' ) ) {
66
+ $tab_content = wp_encode_emoji( $tab_content );
67
+ }
68
+ $tab_content = AWS_Helpers::strip_shortcodes( $tab_content );
69
+ $content = $content . ' ' . $tab_content;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
75
+ }
76
+
77
+ return $content;
78
+
79
+ }
80
+
81
+ /*
82
+ * Custom Tabs was updated
83
+ */
84
+ public function updated_custom_tabs( $meta_id, $object_id, $meta_key, $meta_value ) {
85
+ if ( $meta_key === 'yikes_woo_products_tabs' && apply_filters( 'aws_filter_yikes_woo_products_tabs_sync', true ) ) {
86
+ do_action( 'aws_reindex_product', $object_id );
87
+ }
88
+ }
89
+
90
+ }
91
+
92
+ endif;
93
+
94
+ AWS_Custom_Tabs::instance();
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 6.0
7
- Stable tag: 2.60
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -168,6 +168,10 @@ Yep. This plugin is always compatible with the latest version of Woocommerce?
168
 
169
  == Changelog ==
170
 
 
 
 
 
171
  = 2.60 ( 2022-08-08 ) =
172
  * Update - Css for media styles
173
  * Update - Admin dashboard notices style
4
  Tags: widget, plugin, woocommerce, search, product search, woocommerce search, ajax search, live search, custom search, ajax, shortcode, better search, relevance search, relevant search, search by sku, search plugin, shop, store, wordpress search, wp ajax search, wp search, wp search plugin, sidebar, ecommerce, merketing, products, category search, instant-search, search highlight, woocommerce advanced search, woocommerce live search, WooCommerce Plugin, woocommerce product search
5
  Requires at least: 4.0
6
  Tested up to: 6.0
7
+ Stable tag: 2.61
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
168
 
169
  == Changelog ==
170
 
171
+ = 2.61 ( 2022-08-22 ) =
172
+ * Update - Tested with WC 6.8
173
+ * Update - Custom Product Tabs for WooCommerce plugin integration
174
+
175
  = 2.60 ( 2022-08-08 ) =
176
  * Update - Css for media styles
177
  * Update - Admin dashboard notices style