CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.27

Version Description

(2021-02-03) = * Fixed: Input request issues fixed.

Download this release

Release Info

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

Code changes from version 4.3.26 to 4.3.27

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.26
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
@@ -501,6 +501,9 @@ Using pro version:
501
 
502
  == Changelog ==
503
 
 
 
 
504
  = 4.3.26 (2021-02-03) =
505
  * Added: WooCommerce latest version(4.9) compatibility.
506
  * Fixed: Performance enhancement.
8
  Requires at least: 3.6
9
  Tested Up To: 5.6
10
  Requires PHP: 5.6
11
+ Stable tag: 4.3.27
12
  License: GPLv2 or later
13
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
14
 
501
 
502
  == Changelog ==
503
 
504
+ = 4.3.27 (2021-02-03) =
505
+ * Fixed: Input request issues fixed.
506
+
507
  = 4.3.26 (2021-02-03) =
508
  * Added: WooCommerce latest version(4.9) compatibility.
509
  * Fixed: Performance enhancement.
admin/partials/woo-feed-status.php CHANGED
@@ -13,7 +13,7 @@
13
  ?>
14
  <div class="wrap wapk-admin">
15
  <div class="wapk-section">
16
- <h1 class="wp-heading-inline"><?php _e( 'System Status', 'woo-feed' ); ?></h1>
17
  <hr class="wp-header-end">
18
  <?php WPFFWMessage()->displayMessages(); ?>
19
  <div class="woo-feed-status-table-wrapper">
@@ -60,7 +60,7 @@
60
  </div>
61
  <?php
62
  if ( isset( $_POST['woo-feed-test-options-submit'] ) ) {
63
- $option_name = sanitize_text_field($_POST['woo-feed-test-options']);
64
 
65
  $get_option_val = maybe_unserialize(get_option($option_name));
66
  echo "<pre>";
13
  ?>
14
  <div class="wrap wapk-admin">
15
  <div class="wapk-section">
16
+ <h1 class="wp-heading-inline"><?php esc_html_e( 'System Status', 'woo-feed' ); ?></h1>
17
  <hr class="wp-header-end">
18
  <?php WPFFWMessage()->displayMessages(); ?>
19
  <div class="woo-feed-status-table-wrapper">
60
  </div>
61
  <?php
62
  if ( isset( $_POST['woo-feed-test-options-submit'] ) ) {
63
+ $option_name = sanitize_text_field(wp_unslash($_POST['woo-feed-test-options']));
64
 
65
  $get_option_val = maybe_unserialize(get_option($option_name));
66
  echo "<pre>";
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -595,7 +595,7 @@ class Woo_Feed_Dropdown {
595
  $options = $this->get_cached_dropdown( 'snapchatAttributesDropdown', $selected );
596
  if ( false === $options ) {
597
  $attributes_obj = new Woo_Feed_Default_Attributes();
598
- $attributes = apply_filters( 'woo_feed_filter_dropdown_attributes', $attributes_obj->googleAttributes(), ['snapchat'] );
599
  return $this->cache_dropdown( 'snapchatAttributesDropdown', $attributes, $selected );
600
  }
601
  return $options;
595
  $options = $this->get_cached_dropdown( 'snapchatAttributesDropdown', $selected );
596
  if ( false === $options ) {
597
  $attributes_obj = new Woo_Feed_Default_Attributes();
598
+ $attributes = apply_filters( 'woo_feed_filter_dropdown_attributes', $attributes_obj->googleAttributes(), [ 'snapchat' ] );
599
  return $this->cache_dropdown( 'snapchatAttributesDropdown', $attributes, $selected );
600
  }
601
  return $options;
includes/feeds/merchant_templates_override.php CHANGED
@@ -81,21 +81,20 @@ add_filter('woo_feed_get_bestprice_product_type_attribute','woo_feed_get_bestpri
81
  * @param $feed_config
82
  * @return string
83
  */
84
- if( ! function_exists( 'woo_feed_modify_weight_attribute_value' ) ) {
85
  function woo_feed_modify_weight_attribute_value( $attribute_value, $product, $feed_config ) {
86
- if ( in_array($feed_config['provider'], ['google', 'facebook', 'pinterest', 'bing', 'snapchat']) ) {
87
- if( isset( $feed_config['attributes'] ) ) {
88
  $attributes = $feed_config['attributes'];
89
  $key = array_search ('weight', $attributes);
90
- if( isset( $feed_config['suffix'] ) && !empty($key) ) {
91
- if( array_key_exists( $key, $feed_config['suffix'] ) ) {
92
- $weight_suffix_unit = $feed_config['suffix'][$key];
93
 
94
- if( empty($weight_suffix_unit) && !empty($attribute_value) ) {
95
  $attribute_value = $attribute_value . ' ' . get_option('woocommerce_weight_unit');
96
- }
97
-
98
- }
99
  }
100
  }
101
  }
81
  * @param $feed_config
82
  * @return string
83
  */
84
+ if ( ! function_exists( 'woo_feed_modify_weight_attribute_value' ) ) {
85
  function woo_feed_modify_weight_attribute_value( $attribute_value, $product, $feed_config ) {
86
+ if ( in_array($feed_config['provider'], [ 'google', 'facebook', 'pinterest', 'bing', 'snapchat' ]) ) {
87
+ if ( isset( $feed_config['attributes'] ) ) {
88
  $attributes = $feed_config['attributes'];
89
  $key = array_search ('weight', $attributes);
90
+ if ( isset( $feed_config['suffix'] ) && ! empty($key) ) {
91
+ if ( array_key_exists( $key, $feed_config['suffix'] ) ) {
92
+ $weight_suffix_unit = $feed_config['suffix'][ $key ];
93
 
94
+ if ( empty($weight_suffix_unit) && ! empty($attribute_value) ) {
95
  $attribute_value = $attribute_value . ' ' . get_option('woocommerce_weight_unit');
96
+ }
97
+ }
 
98
  }
99
  }
100
  }
includes/helper.php CHANGED
@@ -1558,7 +1558,7 @@ if ( ! function_exists( 'woo_feed_export_config' ) ) {
1558
  * @since 3.3.10
1559
  */
1560
  function woo_feed_export_config(){
1561
- if ( isset( $_REQUEST['feed'], $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( $_REQUEST['_wpnonce'] ), 'wpf-export' ) ) {
1562
  $feed = sanitize_text_field( wp_unslash($_REQUEST['feed']) );
1563
  $feed = woo_feed_extract_feed_option_name( $feed );
1564
  if ( ! empty( $feed ) ) {
@@ -2892,12 +2892,14 @@ if ( ! function_exists( 'woo_feed_clear_cache_data' ) ) {
2892
  function woo_feed_clear_cache_data() {
2893
  if ( isset( $_REQUEST['_ajax_clean_nonce'] ) ) {
2894
 
2895
- if ( wp_verify_nonce( sanitize_text_field( $_REQUEST['_ajax_clean_nonce'] ), 'clean_cache_nonce' ) ) {
2896
  $data = [];
2897
 
2898
  global $wpdb;
 
2899
  $wpdb->query( "DELETE FROM $wpdb->options WHERE ({$wpdb->options}.option_name LIKE '_transient_timeout___woo_feed_cache_%') OR ({$wpdb->options}.option_name LIKE '_transient___woo_feed_cache_%')" ); // phpcs:ignore
2900
 
 
2901
  $data = [ 'success' => true ];
2902
 
2903
  wp_send_json_success( $data );
@@ -3462,7 +3464,7 @@ if ( ! function_exists( 'woo_feed_pixel_script' ) ) {
3462
  s.parentNode.insertBefore(t,s)}(window, document,'script',
3463
  'https://connect.facebook.net/en_US/fbevents.js');
3464
  fbq('init', '<?php echo $pixel_id; ?>');
3465
- <?php echo $view_type; ?>
3466
  </script>
3467
  <!-- End Facebook Pixel Code -->
3468
  <?php
@@ -3484,7 +3486,7 @@ if ( ! function_exists('woo_feed_addtocart' ) ) {
3484
  // Add to Cart Tracking
3485
  if ( $disable_pixel == 'enable' ) {
3486
  if ( isset( $_REQUEST['add-to-cart'] ) ) {
3487
- $product_id = ! empty( $_REQUEST['add-to-cart'] ) ? $_REQUEST['add-to-cart'] : "";
3488
  $product = wc_get_product( (int)$product_id );
3489
  if ( $product instanceof WC_Product ) {
3490
  $product_name = $product->get_title();
@@ -3550,7 +3552,7 @@ if ( ! function_exists( 'woo_feed_filter_dropdown_attributes' ) ) {
3550
  }
3551
 
3552
  //filtering attributes for snapchat merchant
3553
- if( in_array('snapchat', $merchants) ) {
3554
  $filtered_attributes = array_merge($filtered_attributes, $snapchat_additional_attr);
3555
  }
3556
 
1558
  * @since 3.3.10
1559
  */
1560
  function woo_feed_export_config(){
1561
+ if ( isset( $_REQUEST['feed'], $_REQUEST['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash($_REQUEST['_wpnonce']) ), 'wpf-export' ) ) {
1562
  $feed = sanitize_text_field( wp_unslash($_REQUEST['feed']) );
1563
  $feed = woo_feed_extract_feed_option_name( $feed );
1564
  if ( ! empty( $feed ) ) {
2892
  function woo_feed_clear_cache_data() {
2893
  if ( isset( $_REQUEST['_ajax_clean_nonce'] ) ) {
2894
 
2895
+ if ( wp_verify_nonce( sanitize_text_field( wp_unslash($_REQUEST['_ajax_clean_nonce']) ), 'clean_cache_nonce' ) ) {
2896
  $data = [];
2897
 
2898
  global $wpdb;
2899
+ //TODO add wpdb prepare statement
2900
  $wpdb->query( "DELETE FROM $wpdb->options WHERE ({$wpdb->options}.option_name LIKE '_transient_timeout___woo_feed_cache_%') OR ({$wpdb->options}.option_name LIKE '_transient___woo_feed_cache_%')" ); // phpcs:ignore
2901
 
2902
+
2903
  $data = [ 'success' => true ];
2904
 
2905
  wp_send_json_success( $data );
3464
  s.parentNode.insertBefore(t,s)}(window, document,'script',
3465
  'https://connect.facebook.net/en_US/fbevents.js');
3466
  fbq('init', '<?php echo $pixel_id; ?>');
3467
+ <?php echo $view_type; ?> //phpcs:ignore
3468
  </script>
3469
  <!-- End Facebook Pixel Code -->
3470
  <?php
3486
  // Add to Cart Tracking
3487
  if ( $disable_pixel == 'enable' ) {
3488
  if ( isset( $_REQUEST['add-to-cart'] ) ) {
3489
+ $product_id = ! empty( $_REQUEST['add-to-cart'] ) ? sanitize_text_field( wp_unslash($_REQUEST['add-to-cart']) ) : "";
3490
  $product = wc_get_product( (int)$product_id );
3491
  if ( $product instanceof WC_Product ) {
3492
  $product_name = $product->get_title();
3552
  }
3553
 
3554
  //filtering attributes for snapchat merchant
3555
+ if ( in_array('snapchat', $merchants) ) {
3556
  $filtered_attributes = array_merge($filtered_attributes, $snapchat_additional_attr);
3557
  }
3558
 
includes/log-helper.php CHANGED
@@ -32,7 +32,7 @@ if ( ! function_exists( 'woo_feed_get_logger' ) ) {
32
  */
33
  function woo_feed_get_logger() {
34
 
35
- if( ! class_exists( "Woo_Feed_Log_Handler_File" ) ) {
36
  return false;
37
  }
38
 
@@ -163,7 +163,7 @@ if ( ! function_exists( 'woo_feed_delete_log' ) ) {
163
  */
164
  function woo_feed_delete_log( $source, $handle = false ) {
165
 
166
- if( ! class_exists( "Woo_Feed_Log_Handler_File" ) ) {
167
  return false;
168
  }
169
 
32
  */
33
  function woo_feed_get_logger() {
34
 
35
+ if ( ! class_exists( "Woo_Feed_Log_Handler_File" ) ) {
36
  return false;
37
  }
38
 
163
  */
164
  function woo_feed_delete_log( $source, $handle = false ) {
165
 
166
+ if ( ! class_exists( "Woo_Feed_Log_Handler_File" ) ) {
167
  return false;
168
  }
169
 
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: Product Feed for WooCommerce
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.26
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.26' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
@@ -853,14 +853,14 @@ if ( ! function_exists( 'woo_feed_config_feed' ) ) {
853
  'product_query_type' => isset( $_POST['product_query_type'] ) ? sanitize_text_field( wp_unslash( $_POST['product_query_type'] ) ) : '',
854
  'enable_error_debugging' => isset( $_POST['enable_error_debugging'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_error_debugging'] ) ) : '',
855
  'cache_ttl' => isset( $_POST['cache_ttl'] ) ? absint( $_POST['cache_ttl'] ) : '',
856
- 'overridden_structured_data' => isset( $_POST['overridden_structured_data'] ) ? sanitize_text_field( $_POST['overridden_structured_data'] ) : '',
857
- 'disable_mpn' => isset( $_POST['disable_mpn'] ) ? sanitize_text_field( $_POST['disable_mpn'] ) : '',
858
- 'disable_brand' => isset( $_POST['disable_brand'] ) ? sanitize_text_field( $_POST['disable_brand'] ) : '',
859
- /* 'disable_pixel' => isset( $_POST['disable_pixel'] ) ? sanitize_text_field( $_POST['disable_pixel'] ) : '',
860
- 'pixel_id' => isset( $_POST['pixel_id'] ) ? sanitize_text_field( $_POST['pixel_id'] ) : '',*/
861
- 'allow_all_shipping' => isset( $_POST['allow_all_shipping'] ) ? sanitize_text_field( $_POST['allow_all_shipping'] ) : '',
862
- 'only_free_shipping' => isset( $_POST['only_free_shipping'] ) ? sanitize_text_field( $_POST['only_free_shipping'] ) : '',
863
- 'only_local_pickup_shipping' => isset( $_POST['only_local_pickup_shipping'] ) ? sanitize_text_field( $_POST['only_local_pickup_shipping'] ) : '',
864
  ];
865
 
866
  woo_feed_save_options( $data );
10
  * Plugin Name: Product Feed for WooCommerce
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.27
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.27' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
853
  'product_query_type' => isset( $_POST['product_query_type'] ) ? sanitize_text_field( wp_unslash( $_POST['product_query_type'] ) ) : '',
854
  'enable_error_debugging' => isset( $_POST['enable_error_debugging'] ) ? sanitize_text_field( wp_unslash( $_POST['enable_error_debugging'] ) ) : '',
855
  'cache_ttl' => isset( $_POST['cache_ttl'] ) ? absint( $_POST['cache_ttl'] ) : '',
856
+ 'overridden_structured_data' => isset( $_POST['overridden_structured_data'] ) ? sanitize_text_field( wp_unslash($_POST['overridden_structured_data']) ) : '',
857
+ 'disable_mpn' => isset( $_POST['disable_mpn'] ) ? sanitize_text_field( wp_unslash($_POST['disable_mpn']) ) : '',
858
+ 'disable_brand' => isset( $_POST['disable_brand'] ) ? sanitize_text_field( wp_unslash($_POST['disable_brand']) ) : '',
859
+ /* 'disable_pixel' => isset( $_POST['disable_pixel'] ) ? sanitize_text_field( $_POST['disable_pixel'] ) : '',
860
+ 'pixel_id' => isset( $_POST['pixel_id'] ) ? sanitize_text_field( $_POST['pixel_id'] ) : '',*/
861
+ 'allow_all_shipping' => isset( $_POST['allow_all_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['allow_all_shipping']) ) : '',
862
+ 'only_free_shipping' => isset( $_POST['only_free_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['only_free_shipping']) ) : '',
863
+ 'only_local_pickup_shipping' => isset( $_POST['only_local_pickup_shipping'] ) ? sanitize_text_field( wp_unslash($_POST['only_local_pickup_shipping']) ) : '',
864
  ];
865
 
866
  woo_feed_save_options( $data );