CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.4.67

Version Description

(2022-06-10) = * Fixed: Wanted a one star review. * Fixed: WPML Notice dismiss button not working.

Download this release

Release Info

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

Code changes from version 4.4.66 to 4.4.67

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: WooCommerce Product Feed, WooCommerce, Google Shopping, Google Merchant, F
5
  Requires at least: 4.4
6
  Tested Up To: 6.0
7
  Requires PHP: 5.6
8
- Stable tag: 4.4.66
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -589,6 +589,10 @@ Using pro version:
589
  4. Category Mapping
590
 
591
  == Changelog ==
 
 
 
 
592
  = 4.4.66 (2022-06-07) =
593
  * Added: Securing, Fixing Some input-output P4
594
 
5
  Requires at least: 4.4
6
  Tested Up To: 6.0
7
  Requires PHP: 5.6
8
+ Stable tag: 4.4.67
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
589
  4. Category Mapping
590
 
591
  == Changelog ==
592
+ = 4.4.67 (2022-06-10) =
593
+ * Fixed: Wanted a one star review.
594
+ * Fixed: WPML Notice dismiss button not working.
595
+
596
  = 4.4.66 (2022-06-07) =
597
  * Added: Securing, Fixing Some input-output P4
598
 
includes/classes/class-woo-feed-constants.php CHANGED
@@ -23,7 +23,7 @@ if( ! class_exists("Woo_Feed_Constants") ) {
23
  * @var string
24
  * @since 3.1.6
25
  */
26
- define( 'WOO_FEED_FREE_VERSION', '4.4.66' );
27
  }
28
 
29
  if ( ! defined( 'WOO_FEED_FREE_PATH' ) ) {
23
  * @var string
24
  * @since 3.1.6
25
  */
26
+ define( 'WOO_FEED_FREE_VERSION', '4.4.67' );
27
  }
28
 
29
  if ( ! defined( 'WOO_FEED_FREE_PATH' ) ) {
includes/classes/class-woo-feed-webappick-api.php CHANGED
@@ -12,41 +12,41 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
12
  * Class WooFeedWebAppickAPI
13
  */
14
  final class WooFeedWebAppickAPI {
15
-
16
  /**
17
  * Singleton instance
18
  * @var WooFeedWebAppickAPI
19
  */
20
  protected static $instance;
21
-
22
  /**
23
  * @var CTXFeed\AppServices\Client
24
  */
25
  protected $client = null;
26
-
27
  /**
28
  * @var CTXFeed\AppServices\Insights
29
  */
30
  protected $insights = null;
31
-
32
  /**
33
  * Promotions Class Instance
34
  * @var CTXFeed\AppServices\Promotions
35
  */
36
  public $promotion = null;
37
-
38
  /**
39
  * Plugin License Manager
40
  * @var CTXFeed\AppServices\License
41
  */
42
  protected $license = null;
43
-
44
  /**
45
  * Plugin Updater
46
  * @var CTXFeed\AppServices\Updater
47
  */
48
  protected $updater = null;
49
-
50
  /**
51
  * Initialize
52
  * @return WooFeedWebAppickAPI
@@ -55,7 +55,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
55
  if ( is_null( self::$instance ) ) self::$instance = new self();
56
  return self::$instance;
57
  }
58
-
59
  /**
60
  * Class constructor
61
  *
@@ -73,14 +73,14 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
73
  // Load
74
  $this->insights = $this->client->insights(); // Plugin Insights
75
  $this->promotion = $this->client->promotions(); // Promo offers
76
-
77
  // Setup
78
  $this->promotion->set_source( 'https://api.bitbucket.org/2.0/snippets/woofeed/RLbyop/files/woo-feed-notice.json' );
79
-
80
  // Initialize
81
  $this->insightInit();
82
  $this->promotion->init();
83
-
84
  // Housekeeping.
85
  add_action( 'admin_menu', [ $this, 'premium_features' ], 999 );
86
 
@@ -92,7 +92,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
92
  }
93
 
94
  }
95
-
96
  /**
97
  * Cloning is forbidden.
98
  * @since 1.0.2
@@ -100,7 +100,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
100
  public function __clone() {
101
  _doing_it_wrong( __FUNCTION__, esc_html__( 'Cloning is forbidden.', 'woo-feed' ), '1.0.2' );
102
  }
103
-
104
  /**
105
  * Initialize Insights
106
  * @return void
@@ -149,7 +149,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
149
  }, 10 );
150
  $this->insights->init();
151
  }
152
-
153
  /**
154
  * Generate Support Ticket Email Template
155
  * @return string
@@ -169,7 +169,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
169
  );
170
  return $template;
171
  }
172
-
173
  /**
174
  * Generate Support Ticket Ajax Response
175
  * @return string
@@ -194,7 +194,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
194
  $response .= sprintf( '<p style="font-size: 12px;">%s</p>', $policy );
195
  return $response;
196
  }
197
-
198
  /**
199
  * Set Error Response Message For Support Ticket Request
200
  * @return string
@@ -207,7 +207,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
207
  esc_html__( 'Support Ticket form will open in new tab in 5 seconds.', 'woo-feed' )
208
  );
209
  }
210
-
211
  /**
212
  * Set Data Collection description for the tracker
213
  * @param $data
@@ -225,7 +225,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
225
  ] );
226
  return $data;
227
  }
228
-
229
  /**
230
  * Get Tracker Data Collection Description Array
231
  * @return array
@@ -233,7 +233,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
233
  public function get_data_collection_description() {
234
  return $this->insights->get_data_collection_description();
235
  }
236
-
237
  /**
238
  * Update Tracker OptIn
239
  *
@@ -244,7 +244,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
244
  public function trackerOptIn( $override = false ) {
245
  $this->insights->optIn( $override );
246
  }
247
-
248
  /**
249
  * Update Tracker OptOut
250
  * @return void
@@ -252,7 +252,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
252
  public function trackerOptOut() {
253
  $this->insights->optOut();
254
  }
255
-
256
  /**
257
  * Check if tracking is enable
258
  * @return bool
@@ -260,12 +260,12 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
260
  public function is_tracking_allowed() {
261
  return $this->insights->is_tracking_allowed();
262
  }
263
-
264
  public function premium_features() {
265
  add_submenu_page( 'webappick-manage-feeds', esc_html__('Premium', 'woo-feed'), '<span class="woo-feed-premium">' . esc_html__('Premium', 'woo-feed') . '</span>', 'manage_woocommerce', 'webappick-feed-pro-vs-free', [ $this, 'woo_feed_pro_vs_free' ] );
266
  add_action( 'admin_head', [ $this, 'remove_admin_notices' ], 9999 );
267
  }
268
-
269
  /**
270
  * Render Premium Feature Comparison Page
271
  * @return void
@@ -274,7 +274,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
274
  /** @define "WOO_FEED_FREE_ADMIN_PATH''./../../admin/" */ // phpcs:ignore
275
  require WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-pro-vs-free.php';
276
  }
277
-
278
  /**
279
  * Remove Admin Notice in pro features page.
280
  * @global string $pagenow
@@ -287,7 +287,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
287
  remove_all_actions( 'admin_notices' );
288
  }
289
  }
290
-
291
  /**
292
  * Show Review And Compatibility Notice For Pro Features
293
  * @global string $plugin_page
@@ -344,7 +344,7 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
344
  <button type="submit" name="woo_feed_review_notice_btn_done" value="done" class="button button-secondary"><?php esc_html_e( 'I already did!', 'woo-feed' ); ?></button>
345
  <button type="submit" name="woo_feed_review_notice_btn_given" value="given" class="button button-primary woo-feed-btn-bg-gradient-blue"><?php esc_html_e( 'Review Here', 'woo-feed' ); ?></button>
346
  </p>
347
-
348
  <button type="submit" class="woo-feed-review-btn-dismiss" name="woo_feed_review_notice_submit"><span><?php _e("Dismiss", "woo-feed"); ?></span></button>
349
  </form>
350
  </div>
@@ -383,15 +383,42 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
383
  </div>
384
  <?php
385
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  }
387
-
388
  /**
389
  * Show Review request admin notice
390
  */
391
  public function woo_feed_save_review_notice() {
392
  $user_id = get_current_user_id();
393
 
394
- $woo_feed_review_notice_submit = sanitize_text_field( isset( $_POST['woo_feed_review_notice_submit'] ) ? $_POST['woo_feed_review_notice_submit'] : '' ) ;
395
  $woo_feed_review_notice_btn_given = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_given'] ) ? $_POST['woo_feed_review_notice_btn_given'] : '' ) ;
396
  $woo_feed_review_notice_btn_never = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_never'] ) ? $_POST['woo_feed_review_notice_btn_never'] : '' ) ;
397
  $woo_feed_review_notice_btn_done = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_done'] ) ? $_POST['woo_feed_review_notice_btn_done'] : '' ) ;
@@ -425,6 +452,22 @@ if ( ! class_exists( 'WooFeedWebAppickAPI' ) ) {
425
  }
426
 
427
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  }
429
  }
430
- // End of file class-woo-feed-webappick-api.php
12
  * Class WooFeedWebAppickAPI
13
  */
14
  final class WooFeedWebAppickAPI {
15
+
16
  /**
17
  * Singleton instance
18
  * @var WooFeedWebAppickAPI
19
  */
20
  protected static $instance;
21
+
22
  /**
23
  * @var CTXFeed\AppServices\Client
24
  */
25
  protected $client = null;
26
+
27
  /**
28
  * @var CTXFeed\AppServices\Insights
29
  */
30
  protected $insights = null;
31
+
32
  /**
33
  * Promotions Class Instance
34
  * @var CTXFeed\AppServices\Promotions
35
  */
36
  public $promotion = null;
37
+
38
  /**
39
  * Plugin License Manager
40
  * @var CTXFeed\AppServices\License
41
  */
42
  protected $license = null;
43
+
44
  /**
45
  * Plugin Updater
46
  * @var CTXFeed\AppServices\Updater
47
  */
48
  protected $updater = null;
49
+
50
  /**
51
  * Initialize
52
  * @return WooFeedWebAppickAPI
55
  if ( is_null( self::$instance ) ) self::$instance = new self();
56
  return self::$instance;
57
  }
58
+
59
  /**
60
  * Class constructor
61
  *
73
  // Load
74
  $this->insights = $this->client->insights(); // Plugin Insights
75
  $this->promotion = $this->client->promotions(); // Promo offers
76
+
77
  // Setup
78
  $this->promotion->set_source( 'https://api.bitbucket.org/2.0/snippets/woofeed/RLbyop/files/woo-feed-notice.json' );
79
+
80
  // Initialize
81
  $this->insightInit();
82
  $this->promotion->init();
83
+
84
  // Housekeeping.
85
  add_action( 'admin_menu', [ $this, 'premium_features' ], 999 );
86
 
92
  }
93
 
94
  }
95
+
96
  /**
97
  * Cloning is forbidden.
98
  * @since 1.0.2
100
  public function __clone() {
101
  _doing_it_wrong( __FUNCTION__, esc_html__( 'Cloning is forbidden.', 'woo-feed' ), '1.0.2' );
102
  }
103
+
104
  /**
105
  * Initialize Insights
106
  * @return void
149
  }, 10 );
150
  $this->insights->init();
151
  }
152
+
153
  /**
154
  * Generate Support Ticket Email Template
155
  * @return string
169
  );
170
  return $template;
171
  }
172
+
173
  /**
174
  * Generate Support Ticket Ajax Response
175
  * @return string
194
  $response .= sprintf( '<p style="font-size: 12px;">%s</p>', $policy );
195
  return $response;
196
  }
197
+
198
  /**
199
  * Set Error Response Message For Support Ticket Request
200
  * @return string
207
  esc_html__( 'Support Ticket form will open in new tab in 5 seconds.', 'woo-feed' )
208
  );
209
  }
210
+
211
  /**
212
  * Set Data Collection description for the tracker
213
  * @param $data
225
  ] );
226
  return $data;
227
  }
228
+
229
  /**
230
  * Get Tracker Data Collection Description Array
231
  * @return array
233
  public function get_data_collection_description() {
234
  return $this->insights->get_data_collection_description();
235
  }
236
+
237
  /**
238
  * Update Tracker OptIn
239
  *
244
  public function trackerOptIn( $override = false ) {
245
  $this->insights->optIn( $override );
246
  }
247
+
248
  /**
249
  * Update Tracker OptOut
250
  * @return void
252
  public function trackerOptOut() {
253
  $this->insights->optOut();
254
  }
255
+
256
  /**
257
  * Check if tracking is enable
258
  * @return bool
260
  public function is_tracking_allowed() {
261
  return $this->insights->is_tracking_allowed();
262
  }
263
+
264
  public function premium_features() {
265
  add_submenu_page( 'webappick-manage-feeds', esc_html__('Premium', 'woo-feed'), '<span class="woo-feed-premium">' . esc_html__('Premium', 'woo-feed') . '</span>', 'manage_woocommerce', 'webappick-feed-pro-vs-free', [ $this, 'woo_feed_pro_vs_free' ] );
266
  add_action( 'admin_head', [ $this, 'remove_admin_notices' ], 9999 );
267
  }
268
+
269
  /**
270
  * Render Premium Feature Comparison Page
271
  * @return void
274
  /** @define "WOO_FEED_FREE_ADMIN_PATH''./../../admin/" */ // phpcs:ignore
275
  require WOO_FEED_FREE_ADMIN_PATH . 'partials/woo-feed-pro-vs-free.php';
276
  }
277
+
278
  /**
279
  * Remove Admin Notice in pro features page.
280
  * @global string $pagenow
287
  remove_all_actions( 'admin_notices' );
288
  }
289
  }
290
+
291
  /**
292
  * Show Review And Compatibility Notice For Pro Features
293
  * @global string $plugin_page
344
  <button type="submit" name="woo_feed_review_notice_btn_done" value="done" class="button button-secondary"><?php esc_html_e( 'I already did!', 'woo-feed' ); ?></button>
345
  <button type="submit" name="woo_feed_review_notice_btn_given" value="given" class="button button-primary woo-feed-btn-bg-gradient-blue"><?php esc_html_e( 'Review Here', 'woo-feed' ); ?></button>
346
  </p>
347
+
348
  <button type="submit" class="woo-feed-review-btn-dismiss" name="woo_feed_review_notice_submit"><span><?php _e("Dismiss", "woo-feed"); ?></span></button>
349
  </form>
350
  </div>
383
  </div>
384
  <?php
385
  }
386
+ if ( true === $has_notice ) {
387
+ add_action( 'admin_print_footer_scripts', function() use ( $nonce ) {
388
+ ?>
389
+ <script>
390
+ (function($){
391
+ "use strict";
392
+ $(document)
393
+ .on('click', '.woo-feed-notice a.button', function (e) {
394
+ e.preventDefault();
395
+ // noinspection ES6ConvertVarToLetConst
396
+ var self = $(this), notice = self.attr('data-response');
397
+ if ( 'given' === notice ) {
398
+ window.open('https://wordpress.org/support/plugin/webappick-product-feed-for-woocommerce/reviews/?rate=5#new-post', '_blank');
399
+ }
400
+ self.closest(".woo-feed-notice").slideUp( 200, 'linear' );
401
+ wp.ajax.post( 'woo_feed_save_review_notice', { _ajax_nonce: '<?php echo esc_attr( $nonce ); ?>', notice: notice } );
402
+ })
403
+ .on('click', '.woo-feed-notice .notice-dismiss', function (e) {
404
+ e.preventDefault();
405
+ // noinspection ES6ConvertVarToLetConst
406
+ var self = $(this), feed_notice = self.closest('.woo-feed-notice'), which = feed_notice.attr('data-which');
407
+ wp.ajax.post( 'woo_feed_hide_notice', { _wpnonce: '<?php echo esc_attr( $nonce ); ?>', which: which } );
408
+ });
409
+ })(jQuery)
410
+ </script><?php
411
+ }, 99 );
412
+ }
413
  }
414
+
415
  /**
416
  * Show Review request admin notice
417
  */
418
  public function woo_feed_save_review_notice() {
419
  $user_id = get_current_user_id();
420
 
421
+ $woo_feed_review_notice_submit = isset( $_POST['woo_feed_review_notice_submit'] ) ? 1 : '';
422
  $woo_feed_review_notice_btn_given = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_given'] ) ? $_POST['woo_feed_review_notice_btn_given'] : '' ) ;
423
  $woo_feed_review_notice_btn_never = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_never'] ) ? $_POST['woo_feed_review_notice_btn_never'] : '' ) ;
424
  $woo_feed_review_notice_btn_done = sanitize_text_field( isset( $_POST['woo_feed_review_notice_btn_done'] ) ? $_POST['woo_feed_review_notice_btn_done'] : '' ) ;
452
  }
453
 
454
  }
455
+
456
+ /**
457
+ * Ajax Action For Hiding Compatibility Notices
458
+ */
459
+ public function woo_feed_hide_notice() {
460
+ check_ajax_referer( 'woo_feed_pro_notice_nonce' );
461
+ $notices = [ 'rp-wcdpd', 'wpml', 'rating', 'product_limit' ];
462
+ if ( isset( $_REQUEST['which'] ) && ! empty( $_REQUEST['which'] ) && in_array( $_REQUEST['which'], $notices ) ) {
463
+ $which = sanitize_text_field( $_REQUEST['which'] ); //phpcs:ignore
464
+ update_option( sprintf( 'woo_feed_%s_notice_hidden', $which ), '1', false );
465
+ wp_send_json_success( esc_html__( 'Request Successful.', 'woo-feed' ) );
466
+ wp_die();
467
+ }
468
+ wp_send_json_error( esc_html__( 'Invalid Request.', 'woo-feed' ) );
469
+ wp_die();
470
+ }
471
  }
472
  }
473
+ // End of file class-woo-feed-webappick-api.php
woo-feed.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: CTX 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.4.66
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2
10
  * Plugin Name: CTX 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.4.67
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2