CTX Feed – WooCommerce Product Feed Manager Plugin - Version 3.6.8

Version Description

(2020-06-24) = * Added: Google Shopping subscription_cost attribute added. * Added: Subscription amount attribute added for WooCommerce Subscription.

Download this release

Release Info

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

Code changes from version 3.6.7 to 3.6.8

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.4
7
  Requires PHP: 5.6
8
- Stable tag: 3.6.7
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -305,6 +305,10 @@ Using pro version:
305
 
306
  == Changelog ==
307
 
 
 
 
 
308
  = 3.6.7 (2020-06-23) =
309
  * Added: Subscription period interval attribute added for WooCommerce Subscription.
310
 
5
  Requires at least: 3.6
6
  Tested Up To: 5.4
7
  Requires PHP: 5.6
8
+ Stable tag: 3.6.8
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
305
 
306
  == Changelog ==
307
 
308
+ = 3.6.8 (2020-06-24) =
309
+ * Added: Google Shopping subscription_cost attribute added.
310
+ * Added: Subscription amount attribute added for WooCommerce Subscription.
311
+
312
  = 3.6.7 (2020-06-23) =
313
  * Added: Subscription period interval attribute added for WooCommerce Subscription.
314
 
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -231,8 +231,9 @@ class Woo_Feed_Dropdown {
231
  if ( class_exists( 'WC_Subscriptions' ) ) {
232
  $attributes = array_merge( $attributes,
233
  [
234
- 'subscription_period' => esc_html__( 'Subscription Period', 'woo-feed' ),
235
  'subscription_period_interval' => esc_html__( 'Subscription Period Interval', 'woo-feed' ),
 
236
  ] );
237
  }
238
 
231
  if ( class_exists( 'WC_Subscriptions' ) ) {
232
  $attributes = array_merge( $attributes,
233
  [
234
+ 'subscription_period' => esc_html__( 'Subscription Period', 'woo-feed' ),
235
  'subscription_period_interval' => esc_html__( 'Subscription Period Interval', 'woo-feed' ),
236
+ 'subscription_amount' => esc_html__( 'Subscription Amount', 'woo-feed' ),
237
  ] );
238
  }
239
 
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -697,10 +697,12 @@ class Woo_Feed_Products_v3
697
  if ('google' == $this->config['provider']) {
698
 
699
  // Reformat Shipping attributes for google, facebook
700
- $s = 0;
701
  $t = 0;
702
  $tax = '';
 
703
  $shipping = '';
 
 
704
  if ('xml' == $this->config['feedType']) {
705
  foreach ($merchantAttributes as $key => $value) {
706
 
@@ -766,6 +768,19 @@ class Woo_Feed_Products_v3
766
  $tax .= '<g:rate>' . $output . '</g:rate>' . "\n";
767
  } elseif ('tax_ship' == $value) {
768
  $tax .= '<g:tax_ship>' . $output . '</g:tax_ship>' . "\n";
 
 
 
 
 
 
 
 
 
 
 
 
 
769
  }
770
  }
771
 
@@ -776,8 +791,18 @@ class Woo_Feed_Products_v3
776
  $tax .= '</g:tax>';
777
  }
778
 
 
 
 
 
779
  $this->feedBody .= $shipping;
780
  $this->feedBody .= $tax;
 
 
 
 
 
 
781
  }
782
  // ADD g:identifier_exists
783
  $identifier = array('brand', 'upc', 'sku', 'mpn', 'gtin');
@@ -2607,4 +2632,17 @@ class Woo_Feed_Products_v3
2607
  }
2608
  return '';
2609
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
2610
  }
697
  if ('google' == $this->config['provider']) {
698
 
699
  // Reformat Shipping attributes for google, facebook
 
700
  $t = 0;
701
  $tax = '';
702
+ $s = 0;
703
  $shipping = '';
704
+ $sub = 0;
705
+ $subscription = '';
706
  if ('xml' == $this->config['feedType']) {
707
  foreach ($merchantAttributes as $key => $value) {
708
 
768
  $tax .= '<g:rate>' . $output . '</g:rate>' . "\n";
769
  } elseif ('tax_ship' == $value) {
770
  $tax .= '<g:tax_ship>' . $output . '</g:tax_ship>' . "\n";
771
+ }elseif ( 'subscription_period' == $value ) {
772
+ if ( 0 == $sub ) {
773
+ $subscription .= '<g:subscription_cost>';
774
+ $sub = 1;
775
+ } else {
776
+ $subscription .= '</g:subscription_cost>' . "\n";
777
+ $subscription .= '<g:subscription_cost>';
778
+ }
779
+ $subscription .= '<g:period>' . $output . '</g:period>' . "\n";
780
+ }elseif ( 'subscription_period_length' == $value ) {
781
+ $subscription .= '<g:period_length>' . $output . '</g:period_length>' . "\n";
782
+ }elseif ( 'subscription_amount' == $value ) {
783
+ $subscription .= '<g:amount>' . $output . '</g:amount>' . "\n";
784
  }
785
  }
786
 
791
  $tax .= '</g:tax>';
792
  }
793
 
794
+ if ( 1 == $sub ) {
795
+ $subscription .= '</g:subscription_cost>';
796
+ }
797
+
798
  $this->feedBody .= $shipping;
799
  $this->feedBody .= $tax;
800
+
801
+ if($productObj->is_type('subscription') ||
802
+ $productObj->is_type('variable-subscription') ||
803
+ $productObj->is_type('subscription_variation')){
804
+ $this->feedBody .= $subscription;
805
+ }
806
  }
807
  // ADD g:identifier_exists
808
  $identifier = array('brand', 'upc', 'sku', 'mpn', 'gtin');
2632
  }
2633
  return '';
2634
  }
2635
+
2636
+ /**
2637
+ * Get Subscription period interval
2638
+ *
2639
+ * @param WC_Product $product
2640
+ *
2641
+ * @return mixed
2642
+ * @since 3.6.3
2643
+ *
2644
+ */
2645
+ protected function subscription_amount($product){
2646
+ return $this->price($product);
2647
+ }
2648
  }
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.6.7
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
@@ -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.6.7' );
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.6.8
15
  * Author: WebAppick
16
  * Author URI: https://webappick.com/
17
  * License: GPL v2
39
  * @var string
40
  * @since 3.1.6
41
  */
42
+ define( 'WOO_FEED_FREE_VERSION', '3.6.8' );
43
  }
44
 
45
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {