CTX Feed – WooCommerce Product Feed Manager Plugin - Version 4.3.47

Version Description

(2021-03-14) = * Added: Product full category path attribute added. * Fixed: Product local category label updatd to product category.

Download this release

Release Info

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

Code changes from version 4.3.46 to 4.3.47

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: Product Feed, WooCommerce, Google Shopping, Google Merchant, Facebook Cata
5
  Requires at least: 3.6
6
  Tested Up To: 5.6.1
7
  Requires PHP: 5.6
8
- Stable tag: 4.3.46
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -498,6 +498,10 @@ Using pro version:
498
 
499
  == Changelog ==
500
 
 
 
 
 
501
  = 4.3.46 (2021-03-11) =
502
  * Fixed: Facebook pixel issue solved.
503
 
5
  Requires at least: 3.6
6
  Tested Up To: 5.6.1
7
  Requires PHP: 5.6
8
+ Stable tag: 4.3.47
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
498
 
499
  == Changelog ==
500
 
501
+ = 4.3.47 (2021-03-14) =
502
+ * Added: Product full category path attribute added.
503
+ * Fixed: Product local category label updatd to product category.
504
+
505
  = 4.3.46 (2021-03-11) =
506
  * Fixed: Facebook pixel issue solved.
507
 
includes/classes/class-woo-feed-dropdown.php CHANGED
@@ -259,7 +259,8 @@ class Woo_Feed_Dropdown {
259
  'primary_category_id' => esc_html__( 'Parent Category ID', 'woo-feed' ),
260
  'child_category' => esc_html__( 'Child Category', 'woo-feed' ),
261
  'child_category_id' => esc_html__( 'Child Category ID', 'woo-feed' ),
262
- 'product_type' => esc_html__( 'Product Local Category [Category Path]', 'woo-feed' ),
 
263
  'link' => esc_html__( 'Product URL', 'woo-feed' ),
264
  'parent_link' => esc_html__( 'Parent URL', 'woo-feed' ),
265
  'canonical_link' => esc_html__( 'Canonical URL', 'woo-feed' ),
259
  'primary_category_id' => esc_html__( 'Parent Category ID', 'woo-feed' ),
260
  'child_category' => esc_html__( 'Child Category', 'woo-feed' ),
261
  'child_category_id' => esc_html__( 'Child Category ID', 'woo-feed' ),
262
+ 'product_type' => esc_html__( 'Product Category [Category Path]', 'woo-feed' ),
263
+ 'product_full_cat' => esc_html__( 'Product Full Category [Category Full Path]', 'woo-feed' ),
264
  'link' => esc_html__( 'Product URL', 'woo-feed' ),
265
  'parent_link' => esc_html__( 'Parent URL', 'woo-feed' ),
266
  'canonical_link' => esc_html__( 'Canonical URL', 'woo-feed' ),
includes/classes/class-woo-feed-products-v3.php CHANGED
@@ -2006,7 +2006,28 @@ class Woo_Feed_Products_v3
2006
 
2007
  $separator = apply_filters('woo_feed_product_type_separator', '>', $this->config, $product);
2008
 
2009
- $product_type = woo_feed_get_terms_list_hierarchical_order($id, 'product_cat');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2010
 
2011
  return apply_filters('woo_feed_filter_product_local_category', $product_type, $product, $this->config);
2012
  }
2006
 
2007
  $separator = apply_filters('woo_feed_product_type_separator', '>', $this->config, $product);
2008
 
2009
+ $product_type = woo_feed_get_terms_list_hierarchical_order($id, false);
2010
+
2011
+ return apply_filters('woo_feed_filter_product_local_category', $product_type, $product, $this->config);
2012
+ }
2013
+
2014
+ /**
2015
+ * Get Product Full Categories with unselected category parent
2016
+ *
2017
+ * @param WC_Product $product
2018
+ *
2019
+ * @return string
2020
+ * @since 4.3.47
2021
+ */
2022
+ protected function product_full_cat( $product ) {
2023
+ $id = $product->get_id();
2024
+ if ( $product->is_type('variation') ) {
2025
+ $id = $product->get_parent_id();
2026
+ }
2027
+
2028
+ $separator = apply_filters('woo_feed_product_type_separator', '>', $this->config, $product);
2029
+
2030
+ $product_type = woo_feed_get_terms_list_hierarchical_order($id);
2031
 
2032
  return apply_filters('woo_feed_filter_product_local_category', $product_type, $product, $this->config);
2033
  }
includes/helper.php CHANGED
@@ -2985,14 +2985,27 @@ if ( ! function_exists('woo_feed_get_terms_list_hierarchical_order') ) {
2985
  * Get product terms list by hierarchical order.
2986
  *
2987
  * @param int $id post id
 
2988
  * @param string $taxonomy post taxonomy
 
2989
  * @since 4.2.1
2990
  */
2991
- function woo_feed_get_terms_list_hierarchical_order( $id, $taxonomy = 'product_cat' ) {
2992
  $terms = get_the_terms($id, $taxonomy);
 
2993
  if ( $terms ) {
2994
  foreach ( $terms as $key => $term ) {
 
2995
  if ( 0 !== (int) $term->parent ) {
 
 
 
 
 
 
 
 
 
2996
  $terms[] = $term;
2997
  unset($terms[ $key ]);
2998
  }
2985
  * Get product terms list by hierarchical order.
2986
  *
2987
  * @param int $id post id
2988
+ * @param bool $full_path get full category path if true
2989
  * @param string $taxonomy post taxonomy
2990
+ * @return false|string
2991
  * @since 4.2.1
2992
  */
2993
+ function woo_feed_get_terms_list_hierarchical_order( $id, $full_path = true, $taxonomy = 'product_cat' ) {
2994
  $terms = get_the_terms($id, $taxonomy);
2995
+
2996
  if ( $terms ) {
2997
  foreach ( $terms as $key => $term ) {
2998
+
2999
  if ( 0 !== (int) $term->parent ) {
3000
+
3001
+ //when exact category path is not true, include parent term if has
3002
+ if( $full_path ) {
3003
+ $parent_term = get_term_by('term_id', $term->parent, $taxonomy);
3004
+ if( isset($terms[$key]) && 0 === $key ) {
3005
+ $terms[] = $parent_term;
3006
+ }
3007
+ }
3008
+
3009
  $terms[] = $term;
3010
  unset($terms[ $key ]);
3011
  }
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.3.46
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.46' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
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.3.47
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.47' );
42
  }
43
 
44
  if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {