CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.7.14

Version Description

(2020-09-08) = * Fix: Auto feed update not working issue fixed.

Download this release

Release Info

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

Code changes from version 3.7.13 to 3.7.14

Files changed (3) hide show
  1. README.txt +4 -1
  2. includes/cron-helper.php +46 -19
  3. woo-feed.php +3 -3
README.txt CHANGED
@@ -5,7 +5,7 @@ Tags:product feed,woocommerce product feed,google shopping feed,google shopping,
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
- Stable tag: 3.7.13
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -308,6 +308,9 @@ Using pro version:
308
 
309
  == Changelog ==
310
 
 
 
 
311
  = 3.7.13 (2020-09-05) =
312
  * Fix: Feed file was renamed while feed name changing.
313
 
5
  Requires at least: 3.6
6
  Tested Up To: 5.5
7
  Requires PHP: 5.6
8
+ Stable tag: 3.7.14
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
308
 
309
  == Changelog ==
310
 
311
+ = 3.7.14 (2020-09-08) =
312
+ * Fix: Auto feed update not working issue fixed.
313
+
314
  = 3.7.13 (2020-09-05) =
315
  * Fix: Feed file was renamed while feed name changing.
316
 
includes/cron-helper.php CHANGED
@@ -68,31 +68,58 @@ if ( ! function_exists( 'woo_feed_cron_update_single_feed' ) ) {
68
  *
69
  * @return void
70
  */
71
- function woo_feed_cron_update_single_feed( $feedName ) {
 
 
 
 
72
 
73
- global $wpdb;
74
- $feedName1 = str_replace('wf_config','',$feedName[0]);
75
- $feedName2 = 'wf_feed_' . $feedName1;
 
 
 
 
 
 
76
 
77
  // Delete old duplicate cron.
78
- $old_cron_clean=get_option('woo_feed_old_cron_clean_'.$feedName[0]);
79
  if('cleaned'!==$old_cron_clean){
80
- wp_clear_scheduled_hook( 'woo_feed_update_single_feed',[$feedName[0]]);
81
- update_option('woo_feed_old_cron_clean_'.$feedName[0],'cleaned');
82
- wp_schedule_event( time(), 'woo_feed_corn', 'woo_feed_update_single_feed', [ $feedName[0] ] );
83
  }
 
84
 
85
- $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->options WHERE option_name = %s", $feedName2 ), 'ARRAY_A' ); // phpcs:ignore
86
- if ( ! empty( $result ) ) {
87
- foreach ( $result as $key => $value ) {
88
- $feedInfo = maybe_unserialize( get_option( $value['option_name'] ) );
89
- if ( ! isset( $feedInfo['feedrules'] ) || isset( $feedInfo['status'] ) && '0' == $feedInfo['status'] ) {
90
- continue;
91
- }
92
- woo_feed_generate_feed( $feedInfo['feedrules'], $value['option_name'] );
93
- }
94
- }
95
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
 
97
  add_action( 'woo_feed_update_single_feed', 'woo_feed_cron_update_single_feed' );
98
  }
68
  *
69
  * @return void
70
  */
71
+ function woo_feed_cron_update_single_feed( $feedName ) {
72
+ global $wpdb;
73
+ if(is_array($feedName)){
74
+ $feedName=$feedName[0];
75
+ }
76
 
77
+ $cron_param_feedName=$feedName;
78
+
79
+ if ( woo_feed_is_debugging_enabled() ) {
80
+ woo_feed_delete_log( 'woo-feed-cron' );
81
+ woo_feed_log_feed_process( 'woo-feed-cron', 'Preparing WooFeed Auto Update' );
82
+ $processed = 0;
83
+ }
84
+
85
+ $feedName = str_replace('wf_config','wf_feed_',$feedName);
86
 
87
  // Delete old duplicate cron.
88
+ $old_cron_clean=get_option('woo_feed_old_cron_clean_'.$cron_param_feedName);
89
  if('cleaned'!==$old_cron_clean){
90
+ wp_clear_scheduled_hook( 'woo_feed_update_single_feed',[$cron_param_feedName]);
91
+ update_option('woo_feed_old_cron_clean_'.$cron_param_feedName,'cleaned');
92
+ wp_schedule_event( time(), 'woo_feed_corn', 'woo_feed_update_single_feed', [ $cron_param_feedName ] );
93
  }
94
+ $result = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->options WHERE option_name = %s", $feedName ), 'ARRAY_A' ); // phpcs:ignore
95
 
96
+ if ( ! empty( $result ) ) {
97
+ foreach ( $result as $key => $value ) {
98
+ $feedInfo = maybe_unserialize( get_option( $value['option_name'] ) );
99
+ if ( ! isset( $feedInfo['feedrules'] ) || isset( $feedInfo['status'] ) && '0' == $feedInfo['status'] ) continue;
100
+ try {
101
+ if ( woo_feed_is_debugging_enabled() ) {
102
+ $processed++;
103
+ woo_feed_delete_log( $feedInfo['feedrules']['filename'] );
104
+ woo_feed_log_feed_process( $feedInfo['feedrules']['filename'], sprintf( 'Getting Data for %s feed.', $feedInfo['feedrules']['filename'] ) );
105
+ woo_feed_log_feed_process( $feedInfo['feedrules']['filename'], 'Generating Feed VIA CRON JOB...' );
106
+ woo_feed_log_feed_process( $feedInfo['feedrules']['filename'], sprintf( 'Getting Data for %s feed.', $feedInfo['feedrules']['filename'] ) );
107
+ woo_feed_log_feed_process( $feedInfo['feedrules']['filename'], 'Current Limit is ---.' );
108
+ woo_feed_log( $feedInfo['feedrules']['filename'], 'Feed Config::' . PHP_EOL . print_r( $feedInfo['feedrules'], true ), 'info' ); // phpcs:ignore WordPress.PHP.DevelopmentFunctions.error_log_print_r
109
+ }
110
+ woo_feed_generate_feed( $feedInfo['feedrules'], $value['option_name'] );
111
+ } catch ( Exception $e ) {
112
+ $message = 'Error Updating Feed Via CRON Job' . PHP_EOL . 'Caught Exception :: ' . $e->getMessage();
113
+ woo_feed_log( $feedInfo['feedrules']['filename'], $message, 'critical', $e, true );
114
+ woo_feed_log_fatal_error( $message, $e );
115
+ }
116
+ }
117
+ if ( woo_feed_is_debugging_enabled() ) {
118
+ woo_feed_log_feed_process( 'woo-feed-cron', sprintf( 'Total %d Feed Processed', $processed ) );
119
+ woo_feed_log_feed_process( 'woo-feed-cron', 'WooFeed Auto Update Completed' );
120
+ }
121
+ }
122
+ }
123
 
124
  add_action( 'woo_feed_update_single_feed', 'woo_feed_cron_update_single_feed' );
125
  }
woo-feed.php CHANGED
@@ -11,7 +11,7 @@
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
  *
14
- * Version: 3.7.13
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
@@ -26,7 +26,7 @@
26
  *
27
  * WC Requirement & Test
28
  * WC requires at least: 3.2
29
- * WC tested up to: 4.3
30
  */
31
 
32
  if ( ! defined( 'ABSPATH' ) ) {
@@ -39,7 +39,7 @@ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
39
  * @var string
40
  * @since 3.1.6
41
  */
42
- define( 'WOO_FEED_FREE_VERSION', '3.7.13' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
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
  *
14
+ * Version: 3.7.14
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
26
  *
27
  * WC Requirement & Test
28
  * WC requires at least: 3.2
29
+ * WC tested up to: 4.4
30
  */
31
 
32
  if ( ! defined( 'ABSPATH' ) ) {
39
  * @var string
40
  * @since 3.1.6
41
  */
42
+ define( 'WOO_FEED_FREE_VERSION', '3.7.14' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {