CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.18

Version Description

(2021-01-12) = * Tweak: Removing cache during plugin deactivation. * Tweak: Attribute positioning for yoast, rankmath, all in one seo plugin.

Download this release

Release Info

Developer wahid0003
Plugin Icon 128x128 CTX Feed – WooCommerce Product Feed Manager Plugin
Version 4.3.18
Comparing to
See all releases

Code changes from version 4.3.17 to 4.3.18

README.txt CHANGED
@@ -8,7 +8,7 @@ Google Product Review feed, product variations, rakuteen, shopping, skroutz, TSV
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
- Stable tag: 4.3.17
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
@@ -308,6 +308,10 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
 
311
  = 4.3.17 (2021-01-11) =
312
  * Fixed: Google local and inventory g prefix issue solved.
313
  * Fixed: Edit page file type change issue solved.
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
+ Stable tag: 4.3.18
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
308
 
309
  == Changelog ==
310
 
311
+ = 4.3.18 (2021-01-12) =
312
+ * Tweak: Removing cache during plugin deactivation.
313
+ * Tweak: Attribute positioning for yoast, rankmath, all in one seo plugin.
314
+
315
  = 4.3.17 (2021-01-11) =
316
  * Fixed: Google local and inventory g prefix issue solved.
317
  * Fixed: Edit page file type change issue solved.
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -245,30 +245,87 @@ class Woo_Feed_Dropdown {
245
  'woo_feed_ean' => esc_html__( 'EAN', 'woo-feed' ),
246
  '---1' => '',
247
  );
 
248
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
249
- $attributes = array_merge( $attributes,
250
- [
251
- '_aioseop_title' => esc_html__( 'Title [All in One SEO]', 'woo-feed' ),
252
- '_aioseop_description' => esc_html__( 'Description [All in One SEO]', 'woo-feed' ),
253
- ] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
  }
 
 
255
  if ( class_exists( 'WPSEO_Frontend' ) ) {
256
- $attributes = array_merge( $attributes,
257
- [
 
258
  'yoast_wpseo_title' => esc_html__( 'Title [Yoast SEO]', 'woo-feed' ),
259
- 'yoast_wpseo_metadesc' => esc_html__( 'Description [Yoast SEO]', 'woo-feed' ),
260
- ] );
 
 
 
 
 
 
 
 
 
261
  }
262
 
263
  if ( class_exists( 'RankMath' ) ) {
264
- $attributes = array_merge(
265
- $attributes,
266
- array(
267
- 'rank_math_title' => esc_html__( 'Title [Rank Math SEO]', 'woo-feed' ),
268
- 'rank_math_description' => esc_html__( 'Description [Rank Math SEO]', 'woo-feed' ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
269
  'rank_math_canonical_url' => esc_html__( 'Rank Math Canonical URL [Rank Math SEO]', 'woo-feed' ),
270
- )
271
- );
 
272
  }
273
 
274
  if ( class_exists( 'WC_Subscriptions' ) ) {
245
  'woo_feed_ean' => esc_html__( 'EAN', 'woo-feed' ),
246
  '---1' => '',
247
  );
248
+
249
  if ( class_exists( 'All_in_One_SEO_Pack' ) ) {
250
+ //add all_in_one_seo_pack title array in the dropdown
251
+ if( in_array( 'title', array_keys($attributes) ) ) {
252
+ $search_key = 'title';
253
+ $aioseop_title = [
254
+ '_aioseop_title' => esc_html__( 'Title [All in One SEO]', 'woo-feed' ),
255
+ ];
256
+
257
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $aioseop_title );
258
+ }
259
+
260
+ //add all_in_one_seo_pack description array in the dropdown
261
+ if( in_array( 'description', array_keys($attributes) ) ) {
262
+ $search_key = 'description';
263
+ $aioseop_description = [
264
+ '_aioseop_description' => esc_html__( 'Description [All in One SEO]', 'woo-feed' ),
265
+ ];
266
+
267
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $aioseop_description );
268
+ }
269
+
270
  }
271
+
272
+
273
  if ( class_exists( 'WPSEO_Frontend' ) ) {
274
+ //add yoast title array in the dropdown
275
+ $search_key = in_array( '_aioseop_title', array_keys($attributes) ) ? '_aioseop_title' : 'title';
276
+ $yoast_title = [
277
  'yoast_wpseo_title' => esc_html__( 'Title [Yoast SEO]', 'woo-feed' ),
278
+ ];
279
+
280
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $yoast_title );
281
+
282
+ //add yoast description array in the dropdown
283
+ $search_key = in_array( '_aioseop_description', $attributes ) ? '_aioseop_description' : 'description';
284
+ $yoast_description = [
285
+ 'yoast_wpseo_metadesc' => esc_html__( 'Description [Yoast SEO]', 'woo-feed' ),
286
+ ];
287
+
288
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $yoast_description );
289
  }
290
 
291
  if ( class_exists( 'RankMath' ) ) {
292
+
293
+ //add rankmath title array in the dropdown
294
+ if( in_array( 'yoast_wpseo_title', array_keys($attributes) ) ) {
295
+ $search_key = 'yoast_wpseo_title';
296
+ }elseif( in_array( '_aioseop_title', array_keys($attributes) ) ) {
297
+ $search_key = '_aioseop_title';
298
+ }else {
299
+ $search_key = 'title';
300
+ }
301
+ $rankmath_title = [
302
+ 'rank_math_title' => esc_html__( 'Title [Rank Math SEO]', 'woo-feed' ),
303
+ ];
304
+
305
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_title );
306
+
307
+ //add rankmath description array in the dropdown
308
+ if( in_array( 'yoast_wpseo_metadesc', array_keys($attributes) ) ) {
309
+ $search_key = 'yoast_wpseo_metadesc';
310
+ }elseif( in_array( '_aioseop_description', array_keys($attributes) ) ) {
311
+ $search_key = '_aioseop_description';
312
+ }else {
313
+ $search_key = 'description';
314
+ }
315
+ $rankmath_description = [
316
+ 'rank_math_description' => esc_html__( 'Description [Rank Math SEO]', 'woo-feed' ),
317
+ ];
318
+
319
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_description );
320
+
321
+ //add rankmath canonical_url array in the dropdown
322
+ if( in_array( 'canonical_link', array_keys($attributes) ) ) {
323
+ $search_key = 'canonical_link';
324
+ $rankmath_canonical_link = [
325
  'rank_math_canonical_url' => esc_html__( 'Rank Math Canonical URL [Rank Math SEO]', 'woo-feed' ),
326
+ ];
327
+ $attributes = woo_feed_positioning_attribute_value( $attributes, $search_key, $rankmath_canonical_link );
328
+ }
329
  }
330
 
331
  if ( class_exists( 'WC_Subscriptions' ) ) {
includes/helper.php CHANGED
@@ -3809,4 +3809,30 @@ if ( ! function_exists( 'woo_feed_countries' ) ) {
3809
  }
3810
  }
3811
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3812
  // End of file helper.php.
3809
  }
3810
  }
3811
 
3812
+
3813
+ if ( ! function_exists( 'woo_feed_positioning_attribute_value' ) ) {
3814
+ /**
3815
+ * Positioning new associative array in attribute's dropdown list
3816
+ *
3817
+ * @param $array array Main attribute array.
3818
+ * @param $key string Targeted main array key, after that key index the given associative array should come.
3819
+ * @param $input_array array Given associative array.
3820
+ *
3821
+ * @author Nazrul Islam Nayan
3822
+ * @updated 12-01-2021
3823
+ *
3824
+ * @since 4.3.18
3825
+ * @return array $array
3826
+ */
3827
+ function woo_feed_positioning_attribute_value($array, $key, $input_array ){
3828
+ $keys = array_keys( $array );
3829
+ $index = array_search( $key, $keys, true );
3830
+ $pos = false === $index ? count( $array ) : $index + 1;
3831
+
3832
+ $array = array_slice($array, 0, $pos, true) + $input_array + array_slice($array, $pos, count($array) - 1, true);
3833
+ return $array;
3834
+ }
3835
+ }
3836
+
3837
+
3838
  // End of file helper.php.
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
- * Version: 4.3.17
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
@@ -38,7 +38,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
38
  * @var string
39
  * @since 3.1.6
40
  */
41
- define( 'WOO_FEED_FREE_VERSION', '4.3.17' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
@@ -958,5 +958,16 @@ if ( ! class_exists('webappick_suggest_plugin') ) {
958
  add_action('init', array( 'webappick_suggest_plugin', 'init' ));
959
  }
960
 
 
 
 
 
 
 
 
 
 
 
 
961
 
962
  // End of file woo-feed.php
10
  * Plugin Name: WooCommerce Product Feed
11
  * Plugin URI: https://webappick.com/
12
  * Description: Easily generate woocommerce product feed for any marketing channel like Google Shopping(Merchant), Facebook Remarketing, Bing, eBay & more. Support 100+ Merchants.
13
+ * Version: 4.3.18
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
38
  * @var string
39
  * @since 3.1.6
40
  */
41
+ define( 'WOO_FEED_FREE_VERSION', '4.3.18' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
958
  add_action('init', array( 'webappick_suggest_plugin', 'init' ));
959
  }
960
 
961
+ register_deactivation_hook( __FILE__, 'woo_feed_deactivate' );
962
+ if ( ! function_exists( 'woo_feed_deactivate' ) ) {
963
+ /**
964
+ * Flash cache purged after plugin deactivation
965
+ * @return void
966
+ */
967
+ function woo_feed_deactivate() {
968
+ woo_feed_flush_cache_data(); //clean caches.
969
+ }
970
+ }
971
+
972
 
973
  // End of file woo-feed.php