CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.4.56

Version Description

(2022-03-29) = * Fixed: Call to a member function get_price() on bool - issue has been fixed.

Download this release

Release Info

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

Code changes from version 4.4.55 to 4.4.56

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: 5.9
7
  Requires PHP: 5.6
8
- Stable tag: 4.4.55
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -590,6 +590,9 @@ Using pro version:
590
 
591
  == Changelog ==
592
 
 
 
 
593
  = 4.4.55 (2022-03-22) =
594
  * Updated: Google Promotional Feed attributes updated.
595
  * Fixed: XLS file not generating for custom template 1 - issue has been solved.
5
  Requires at least: 4.4
6
  Tested Up To: 5.9
7
  Requires PHP: 5.6
8
+ Stable tag: 4.4.56
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
590
 
591
  == Changelog ==
592
 
593
+ = 4.4.56 (2022-03-29) =
594
+ * Fixed: Call to a member function get_price() on bool - issue has been fixed.
595
+
596
  = 4.4.55 (2022-03-22) =
597
  * Updated: Google Promotional Feed attributes updated.
598
  * Fixed: XLS file not generating for custom template 1 - issue has been solved.
includes/classes/class-woo-feed-constants.php CHANGED
@@ -5,112 +5,114 @@
5
  * @since 4.4.41
6
  */
7
 
8
- class Woo_Feed_Constants {
9
- public $version;
10
- function __construct() {
11
- $this->version = "free";
12
- }
 
13
 
14
- static function defined_constants() {
15
- if ( defined( 'WOO_FEED_FREE_VERSION' ) )
16
- return;
17
 
18
- if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
19
- /**
20
- * Plugin Version
21
- *
22
- * @var string
23
- * @since 3.1.6
24
- */
25
- define( 'WOO_FEED_FREE_VERSION', '4.4.55' );
26
- }
27
 
28
- if ( ! defined( 'WOO_FEED_FREE_PATH' ) ) {
29
- /**
30
- * Plugin Path with trailing slash
31
- *
32
- * @var string dirname( __FILE__ )
33
- * * @since 3.1.6
34
- */
35
- /** @define "WOO_FEED_FREE_PATH" "./" */ // phpcs:ignore
36
- define( 'WOO_FEED_FREE_PATH', plugin_dir_path( WOO_FEED_FREE_FILE ) );
37
- }
38
- if ( ! defined( 'WOO_FEED_FREE_ADMIN_PATH' ) ) {
39
- /**
40
- * Admin File Path with trailing slash
41
- *
42
- * @var string
43
- * @since 3.1.6
44
- */
45
- define( 'WOO_FEED_FREE_ADMIN_PATH', WOO_FEED_FREE_PATH . 'admin/' );
46
- }
47
 
48
- if ( ! defined( 'WOO_FEED_FREE_LIBS_PATH' ) ) {
49
- /**
50
- * Admin File Path with trailing slash
51
- *
52
- * @var string
53
- */
54
- define( 'WOO_FEED_FREE_LIBS_PATH', WOO_FEED_FREE_PATH . 'libs/' );
55
- }
56
- if ( ! defined( 'WOO_FEED_PLUGIN_URL' ) ) {
57
- /**
58
- * Plugin Directory URL
59
- *
60
- * @var string
61
- * @since 3.1.37
62
- */
63
- define( 'WOO_FEED_PLUGIN_URL', trailingslashit( plugin_dir_url( WOO_FEED_FREE_FILE ) ) );
64
- }
65
- if ( ! defined( 'WOO_FEED_MIN_PHP_VERSION' ) ) {
66
- /**
67
- * Minimum PHP Version Supported
68
- *
69
- * @var string
70
- * @since 3.1.41
71
- */
72
- define( 'WOO_FEED_MIN_PHP_VERSION', '5.6' );
73
- }
74
- if ( ! defined( 'WOO_FEED_MIN_WC_VERSION' ) ) {
75
- /**
76
- * Minimum WooCommerce Version Supported
77
- *
78
- * @var string
79
- * @since 3.1.45
80
- */
81
- define( 'WOO_FEED_MIN_WC_VERSION', '3.2' );
82
- }
83
- if ( ! defined( 'WOO_FEED_PLUGIN_BASE_NAME' ) ) {
84
- /**
85
- * Plugin Base name..
86
- *
87
- * @var string
88
- * @since 3.1.41
89
- */
90
- define( 'WOO_FEED_PLUGIN_BASE_NAME', plugin_basename( WOO_FEED_FREE_FILE ) );
91
- }
92
 
93
- if ( ! defined( 'WOO_FEED_LOG_DIR' ) ) {
94
- $upload_dir = wp_get_upload_dir();
95
- /**
96
- * Log Directory
97
- *
98
- * @var string
99
- * @since 3.2.1
100
- */
101
- /** @define "WOO_FEED_LOG_DIR" "./../../uploads/woo-feed/logs" */ // phpcs:ignore
102
- define( 'WOO_FEED_LOG_DIR', $upload_dir['basedir'] . '/woo-feed/logs/' );
103
- }
104
 
105
- if ( ! defined( 'WOO_FEED_CACHE_TTL' ) ) {
106
- $_cache_ttl = get_option( 'woo_feed_settings', array( 'cache_ttl' => 6 * HOUR_IN_SECONDS ) );
107
- /**
108
- * Cache TTL
109
- *
110
- * @var int
111
- * @since 3.3.11
112
- */
113
- define( 'WOO_FEED_CACHE_TTL', $_cache_ttl['cache_ttl'] );
114
- }
115
- }
 
116
  }
5
  * @since 4.4.41
6
  */
7
 
8
+ if( ! class_exists("Woo_Feed_Constants") ) {
9
+ class Woo_Feed_Constants {
10
+ public $version;
11
+ function __construct() {
12
+ $this->version = "free";
13
+ }
14
 
15
+ static function defined_constants() {
16
+ if ( defined( 'WOO_FEED_FREE_VERSION' ) )
17
+ return;
18
 
19
+ if ( ! defined( 'WOO_FEED_FREE_VERSION' ) ) {
20
+ /**
21
+ * Plugin Version
22
+ *
23
+ * @var string
24
+ * @since 3.1.6
25
+ */
26
+ define( 'WOO_FEED_FREE_VERSION', '4.4.56' );
27
+ }
28
 
29
+ if ( ! defined( 'WOO_FEED_FREE_PATH' ) ) {
30
+ /**
31
+ * Plugin Path with trailing slash
32
+ *
33
+ * @var string dirname( __FILE__ )
34
+ * * @since 3.1.6
35
+ */
36
+ /** @define "WOO_FEED_FREE_PATH" "./" */ // phpcs:ignore
37
+ define( 'WOO_FEED_FREE_PATH', plugin_dir_path( WOO_FEED_FREE_FILE ) );
38
+ }
39
+ if ( ! defined( 'WOO_FEED_FREE_ADMIN_PATH' ) ) {
40
+ /**
41
+ * Admin File Path with trailing slash
42
+ *
43
+ * @var string
44
+ * @since 3.1.6
45
+ */
46
+ define( 'WOO_FEED_FREE_ADMIN_PATH', WOO_FEED_FREE_PATH . 'admin/' );
47
+ }
48
 
49
+ if ( ! defined( 'WOO_FEED_FREE_LIBS_PATH' ) ) {
50
+ /**
51
+ * Admin File Path with trailing slash
52
+ *
53
+ * @var string
54
+ */
55
+ define( 'WOO_FEED_FREE_LIBS_PATH', WOO_FEED_FREE_PATH . 'libs/' );
56
+ }
57
+ if ( ! defined( 'WOO_FEED_PLUGIN_URL' ) ) {
58
+ /**
59
+ * Plugin Directory URL
60
+ *
61
+ * @var string
62
+ * @since 3.1.37
63
+ */
64
+ define( 'WOO_FEED_PLUGIN_URL', trailingslashit( plugin_dir_url( WOO_FEED_FREE_FILE ) ) );
65
+ }
66
+ if ( ! defined( 'WOO_FEED_MIN_PHP_VERSION' ) ) {
67
+ /**
68
+ * Minimum PHP Version Supported
69
+ *
70
+ * @var string
71
+ * @since 3.1.41
72
+ */
73
+ define( 'WOO_FEED_MIN_PHP_VERSION', '5.6' );
74
+ }
75
+ if ( ! defined( 'WOO_FEED_MIN_WC_VERSION' ) ) {
76
+ /**
77
+ * Minimum WooCommerce Version Supported
78
+ *
79
+ * @var string
80
+ * @since 3.1.45
81
+ */
82
+ define( 'WOO_FEED_MIN_WC_VERSION', '3.2' );
83
+ }
84
+ if ( ! defined( 'WOO_FEED_PLUGIN_BASE_NAME' ) ) {
85
+ /**
86
+ * Plugin Base name..
87
+ *
88
+ * @var string
89
+ * @since 3.1.41
90
+ */
91
+ define( 'WOO_FEED_PLUGIN_BASE_NAME', plugin_basename( WOO_FEED_FREE_FILE ) );
92
+ }
93
 
94
+ if ( ! defined( 'WOO_FEED_LOG_DIR' ) ) {
95
+ $upload_dir = wp_get_upload_dir();
96
+ /**
97
+ * Log Directory
98
+ *
99
+ * @var string
100
+ * @since 3.2.1
101
+ */
102
+ /** @define "WOO_FEED_LOG_DIR" "./../../uploads/woo-feed/logs" */ // phpcs:ignore
103
+ define( 'WOO_FEED_LOG_DIR', $upload_dir['basedir'] . '/woo-feed/logs/' );
104
+ }
105
 
106
+ if ( ! defined( 'WOO_FEED_CACHE_TTL' ) ) {
107
+ $_cache_ttl = get_option( 'woo_feed_settings', array( 'cache_ttl' => 6 * HOUR_IN_SECONDS ) );
108
+ /**
109
+ * Cache TTL
110
+ *
111
+ * @var int
112
+ * @since 3.3.11
113
+ */
114
+ define( 'WOO_FEED_CACHE_TTL', $_cache_ttl['cache_ttl'] );
115
+ }
116
+ }
117
+ }
118
  }
includes/helper.php CHANGED
@@ -3621,6 +3621,11 @@ if ( ! function_exists('woo_feed_filter_woocommerce_structured_data_product') )
3621
  * @since 4.3.6
3622
  */
3623
  function woo_feed_filter_woocommerce_structured_data_product( $markup, $product ) {
 
 
 
 
 
3624
  $settings = woo_feed_get_options('all');
3625
  $disable_mpn = $settings['disable_mpn'];
3626
  $disable_brand = $settings['disable_brand'];
@@ -5383,6 +5388,9 @@ if ( ! function_exists('woo_feed_make_feed_big_data') ) {
5383
  if( ! function_exists('woo_feed_after_wc_product_structured_data') ) {
5384
  function woo_feed_after_wc_product_structured_data($markup, $product) {
5385
 
 
 
 
5386
 
5387
  if( isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], 'attribute_') ) {
5388
  $url = $_SERVER['REQUEST_URI'];
@@ -5423,14 +5431,21 @@ if( ! function_exists('woo_feed_after_wc_product_structured_data') ) {
5423
  )
5424
  );
5425
 
5426
- $variation_product = wc_get_product($variation_id[0]);
5427
- $variation_price = $variation_product->get_price();
 
 
 
 
 
 
 
 
 
 
 
 
5428
 
5429
- $markup['offers'][0]['@type'] = "Offer";
5430
- $markup['offers'][0]['price'] = $variation_price;
5431
- $markup['offers'][0]['priceSpecification']['price'] = $variation_price;
5432
- $markup['offers'][0]['priceSpecification']['priceCurrency'] = $currency;
5433
- $markup['offers'][0]['priceCurrency'] = $currency;
5434
  }
5435
  }
5436
 
3621
  * @since 4.3.6
3622
  */
3623
  function woo_feed_filter_woocommerce_structured_data_product( $markup, $product ) {
3624
+
3625
+ if( ! $product instanceof WC_Product ) {
3626
+ return $markup;
3627
+ }
3628
+
3629
  $settings = woo_feed_get_options('all');
3630
  $disable_mpn = $settings['disable_mpn'];
3631
  $disable_brand = $settings['disable_brand'];
5388
  if( ! function_exists('woo_feed_after_wc_product_structured_data') ) {
5389
  function woo_feed_after_wc_product_structured_data($markup, $product) {
5390
 
5391
+ if( ! $product instanceof WC_Product ) {
5392
+ return $markup;
5393
+ }
5394
 
5395
  if( isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], 'attribute_') ) {
5396
  $url = $_SERVER['REQUEST_URI'];
5431
  )
5432
  );
5433
 
5434
+ if( isset($variation_id[0]) ) {
5435
+ $variation_product = wc_get_product($variation_id[0]);
5436
+
5437
+ if( $variation_product instanceof WC_Product_Variation ) {
5438
+ $variation_price = $variation_product->get_price();
5439
+
5440
+ $markup['offers'][0]['@type'] = "Offer";
5441
+ $markup['offers'][0]['price'] = $variation_price;
5442
+ $markup['offers'][0]['priceSpecification']['price'] = $variation_price;
5443
+ $markup['offers'][0]['priceSpecification']['priceCurrency'] = $currency;
5444
+ $markup['offers'][0]['priceCurrency'] = $currency;
5445
+ }
5446
+
5447
+ }
5448
 
 
 
 
 
 
5449
  }
5450
  }
5451
 
languages/woo-feed.pot CHANGED
@@ -16,7 +16,7 @@ msgstr ""
16
  msgid "Unauthorized Action."
17
  msgstr ""
18
 
19
- #: woo-feed.php:141, woo-feed.php:260, includes/helper.php:823, includes/helper.php:1843, includes/helper.php:2860, includes/helper.php:2888, includes/helper.php:3268, includes/helper.php:3459, includes/helper.php:3486, includes/helper.php:4711, includes/helper.php:5201
20
  msgid "Invalid Request."
21
  msgstr ""
22
 
@@ -709,31 +709,31 @@ msgstr ""
709
  msgid "Choose from the most used"
710
  msgstr ""
711
 
712
- #: includes/helper.php:4408
713
  msgid "Option Successfully Added."
714
  msgstr ""
715
 
716
- #: includes/helper.php:4399
717
  msgid "Option Already Added."
718
  msgstr ""
719
 
720
- #: includes/helper.php:5108
721
  msgid "Delivery up to 30 days"
722
  msgstr ""
723
 
724
- #: includes/helper.php:5106
725
  msgid "Delivery 1 to 3 days"
726
  msgstr ""
727
 
728
- #: includes/helper.php:5209
729
  msgid "Feed data is empty. Can't duplicate feed."
730
  msgstr ""
731
 
732
- #: includes/helper.php:5225
733
  msgid "Unable to save the duplicate feed data."
734
  msgstr ""
735
 
736
- #: includes/helper.php:5235
737
  msgid "Feed Successfully Duplicated, but unable to generate the data file. Please click the \"Regenerate Button\""
738
  msgstr ""
739
 
16
  msgid "Unauthorized Action."
17
  msgstr ""
18
 
19
+ #: woo-feed.php:141, woo-feed.php:260, includes/helper.php:823, includes/helper.php:1843, includes/helper.php:2860, includes/helper.php:2888, includes/helper.php:3268, includes/helper.php:3459, includes/helper.php:3486, includes/helper.php:4716, includes/helper.php:5206
20
  msgid "Invalid Request."
21
  msgstr ""
22
 
709
  msgid "Choose from the most used"
710
  msgstr ""
711
 
712
+ #: includes/helper.php:4413
713
  msgid "Option Successfully Added."
714
  msgstr ""
715
 
716
+ #: includes/helper.php:4404
717
  msgid "Option Already Added."
718
  msgstr ""
719
 
720
+ #: includes/helper.php:5113
721
  msgid "Delivery up to 30 days"
722
  msgstr ""
723
 
724
+ #: includes/helper.php:5111
725
  msgid "Delivery 1 to 3 days"
726
  msgstr ""
727
 
728
+ #: includes/helper.php:5214
729
  msgid "Feed data is empty. Can't duplicate feed."
730
  msgstr ""
731
 
732
+ #: includes/helper.php:5230
733
  msgid "Unable to save the duplicate feed data."
734
  msgstr ""
735
 
736
+ #: includes/helper.php:5240
737
  msgid "Feed Successfully Duplicated, but unable to generate the data file. Please click the \"Regenerate Button\""
738
  msgstr ""
739
 
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.55
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.56
14
  * Author: WebAppick
15
  * Author URI: https://webappick.com/
16
  * License: GPL v2