Version Description
(2021-06-30) = * Fixed: Gtin missing issue has been fixed. * Fixed: Availability attribute value should return 0 when out of stock product quantity is empty.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.4.9 |
Comparing to | |
See all releases |
Code changes from version 4.4.8 to 4.4.9
- README.txt +5 -1
- includes/classes/class-woo-feed-products-v3.php +9 -4
- includes/helper.php +6 -8
- woo-feed.php +2 -2
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.7
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 4.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -516,6 +516,10 @@ Using pro version:
|
|
516 |
|
517 |
== Changelog ==
|
518 |
|
|
|
|
|
|
|
|
|
519 |
= 4.4.8 (2021-06-29) =
|
520 |
* Fixed: Google Shipping attribute not adding to CSV Feed has been solved.
|
521 |
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.4.9
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
516 |
|
517 |
== Changelog ==
|
518 |
|
519 |
+
= 4.4.9 (2021-06-30) =
|
520 |
+
* Fixed: Gtin missing issue has been fixed.
|
521 |
+
* Fixed: Availability attribute value should return 0 when out of stock product quantity is empty.
|
522 |
+
|
523 |
= 4.4.8 (2021-06-29) =
|
524 |
* Fixed: Google Shipping attribute not adding to CSV Feed has been solved.
|
525 |
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -260,7 +260,7 @@ class Woo_Feed_Products_v3
|
|
260 |
* @since 3.1.18
|
261 |
* @var string
|
262 |
*/
|
263 |
-
const PRODUCT_CUSTOM_IDENTIFIER = '
|
264 |
|
265 |
/**
|
266 |
* Product Category Mapping Prefix
|
@@ -1434,7 +1434,6 @@ class Woo_Feed_Products_v3
|
|
1434 |
if ( method_exists($this, $attribute) ) {
|
1435 |
$output = call_user_func_array(array( $this, $attribute ), array( $product ));
|
1436 |
} elseif ( false !== strpos( $attribute, self::PRODUCT_CUSTOM_IDENTIFIER ) || woo_feed_strpos_array(array( 'gtin', 'ean', 'mpn' ), $attribute) ) {
|
1437 |
-
|
1438 |
$output = $this->getCustomField( $product, $attribute );
|
1439 |
} elseif ( false !== strpos($attribute, self::PRODUCT_ATTRIBUTE_PREFIX) ) {
|
1440 |
$attribute = str_replace(self::PRODUCT_ATTRIBUTE_PREFIX, '', $attribute);
|
@@ -2541,6 +2540,14 @@ class Woo_Feed_Products_v3
|
|
2541 |
*
|
2542 |
*/
|
2543 |
protected function quantity( $product ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2544 |
if ( $product->is_type('variable') && $product->has_child() ) {
|
2545 |
$visible_children = $product->get_visible_children();
|
2546 |
$qty = array();
|
@@ -2565,8 +2572,6 @@ class Woo_Feed_Products_v3
|
|
2565 |
}
|
2566 |
}
|
2567 |
|
2568 |
-
$quantity = $product->get_stock_quantity();
|
2569 |
-
|
2570 |
return apply_filters('woo_feed_filter_product_quantity', $quantity, $product, $this->config);
|
2571 |
}
|
2572 |
|
260 |
* @since 3.1.18
|
261 |
* @var string
|
262 |
*/
|
263 |
+
const PRODUCT_CUSTOM_IDENTIFIER = 'woo_feed_';
|
264 |
|
265 |
/**
|
266 |
* Product Category Mapping Prefix
|
1434 |
if ( method_exists($this, $attribute) ) {
|
1435 |
$output = call_user_func_array(array( $this, $attribute ), array( $product ));
|
1436 |
} elseif ( false !== strpos( $attribute, self::PRODUCT_CUSTOM_IDENTIFIER ) || woo_feed_strpos_array(array( 'gtin', 'ean', 'mpn' ), $attribute) ) {
|
|
|
1437 |
$output = $this->getCustomField( $product, $attribute );
|
1438 |
} elseif ( false !== strpos($attribute, self::PRODUCT_ATTRIBUTE_PREFIX) ) {
|
1439 |
$attribute = str_replace(self::PRODUCT_ATTRIBUTE_PREFIX, '', $attribute);
|
2540 |
*
|
2541 |
*/
|
2542 |
protected function quantity( $product ) {
|
2543 |
+
$quantity = $product->get_stock_quantity();
|
2544 |
+
$status = $product->get_stock_status();
|
2545 |
+
|
2546 |
+
//when product is outofstock and it's quantity is empty, set quantity to 0
|
2547 |
+
if ( 'outofstock' == $status && empty($quantity) ) {
|
2548 |
+
$quantity = 0;
|
2549 |
+
}
|
2550 |
+
|
2551 |
if ( $product->is_type('variable') && $product->has_child() ) {
|
2552 |
$visible_children = $product->get_visible_children();
|
2553 |
$qty = array();
|
2572 |
}
|
2573 |
}
|
2574 |
|
|
|
|
|
2575 |
return apply_filters('woo_feed_filter_product_quantity', $quantity, $product, $this->config);
|
2576 |
}
|
2577 |
|
includes/helper.php
CHANGED
@@ -2718,7 +2718,7 @@ if ( ! function_exists('woo_feed_add_custom_identifier') ) {
|
|
2718 |
$custom_field_key = sprintf( 'woo_feed_%s', strtolower( $key ) );
|
2719 |
}
|
2720 |
|
2721 |
-
$custom_field_id = esc_attr( wp_unslash( "
|
2722 |
$custom_field_label = esc_attr( wp_unslash( $custom_fields[ $key ][0] ) );
|
2723 |
$custom_field_description = __( 'Set product ', 'woo-feed' ) . esc_html( $custom_field_label ) . __( ' here.', 'woo-feed');
|
2724 |
woocommerce_wp_text_input(
|
@@ -2756,12 +2756,10 @@ if ( ! function_exists('woo_feed_save_custom_identifier') ) {
|
|
2756 |
|
2757 |
if ( ! empty( $custom_identifier ) ) {
|
2758 |
foreach ( $custom_identifier as $key => $name ) {
|
2759 |
-
$product_meta_key = "
|
2760 |
-
$product_meta_value = isset( $_POST[ $product_meta_key ] ) ? sanitize_text_field( $_POST[ $product_meta_key ] ) : '';
|
2761 |
if ( isset( $product_meta_value ) && ! empty( $product_meta_value ) ) {
|
2762 |
update_post_meta( $product_id, $product_meta_key, $product_meta_value );
|
2763 |
-
} else {
|
2764 |
-
delete_post_meta( $product_id, $product_meta_key );
|
2765 |
}
|
2766 |
}
|
2767 |
}
|
@@ -2796,7 +2794,7 @@ if ( ! function_exists('woo_feed_add_custom_identifier_for_variation') ) {
|
|
2796 |
echo '<div class="woo-feed-variation-items">';
|
2797 |
|
2798 |
foreach ( $custom_identifier as $key => $value ) {
|
2799 |
-
$custom_field_id = sprintf( '
|
2800 |
$custom_field_label = isset( $value[0] ) ? $value[0] : '';
|
2801 |
|
2802 |
$custom_field_description = sprintf( 'Set product %s here.', $custom_field_label );
|
@@ -2843,9 +2841,9 @@ if ( ! function_exists('woo_feed_save_custom_identifier_for_variation') ) {
|
|
2843 |
|
2844 |
if ( ! empty( $custom_identifier ) ) {
|
2845 |
foreach ( $custom_identifier as $key => $value ) {
|
2846 |
-
$custom_field_value = isset( $_POST[ "
|
2847 |
if ( isset($custom_field_value) ) {
|
2848 |
-
update_post_meta( $variation_id, "
|
2849 |
}
|
2850 |
}
|
2851 |
}
|
2718 |
$custom_field_key = sprintf( 'woo_feed_%s', strtolower( $key ) );
|
2719 |
}
|
2720 |
|
2721 |
+
$custom_field_id = esc_attr( wp_unslash( "woo_feed_{$key}" ) );
|
2722 |
$custom_field_label = esc_attr( wp_unslash( $custom_fields[ $key ][0] ) );
|
2723 |
$custom_field_description = __( 'Set product ', 'woo-feed' ) . esc_html( $custom_field_label ) . __( ' here.', 'woo-feed');
|
2724 |
woocommerce_wp_text_input(
|
2756 |
|
2757 |
if ( ! empty( $custom_identifier ) ) {
|
2758 |
foreach ( $custom_identifier as $key => $name ) {
|
2759 |
+
$product_meta_key = "woo_feed_{$key}";
|
2760 |
+
$product_meta_value = isset( $_POST[ $product_meta_key ] ) ? sanitize_text_field( $_POST[ $product_meta_key ] ) : ( isset( $_POST["woo_feed_identifier_{$key}"] ) ? sanitize_text_field( $_POST["woo_feed_identifier_{$key}"] ) : '' );
|
2761 |
if ( isset( $product_meta_value ) && ! empty( $product_meta_value ) ) {
|
2762 |
update_post_meta( $product_id, $product_meta_key, $product_meta_value );
|
|
|
|
|
2763 |
}
|
2764 |
}
|
2765 |
}
|
2794 |
echo '<div class="woo-feed-variation-items">';
|
2795 |
|
2796 |
foreach ( $custom_identifier as $key => $value ) {
|
2797 |
+
$custom_field_id = sprintf( 'woo_feed_%s_var[%d]', strtolower( $key ), $variation->ID );
|
2798 |
$custom_field_label = isset( $value[0] ) ? $value[0] : '';
|
2799 |
|
2800 |
$custom_field_description = sprintf( 'Set product %s here.', $custom_field_label );
|
2841 |
|
2842 |
if ( ! empty( $custom_identifier ) ) {
|
2843 |
foreach ( $custom_identifier as $key => $value ) {
|
2844 |
+
$custom_field_value = isset( $_POST[ "woo_feed_{$key}_var" ][ $variation_id ] ) ? sanitize_text_field( $_POST[ "woo_feed_{$key}_var" ][ $variation_id ] ) : ( isset( $_POST["woo_feed_identifier_{$key}_var"][$variation_id] ) ? sanitize_text_field( $_POST["woo_feed_identifier_{$key}_var"] ) : '' );
|
2845 |
if ( isset($custom_field_value) ) {
|
2846 |
+
update_post_meta( $variation_id, "woo_feed_{$key}_var", $custom_field_value );
|
2847 |
}
|
2848 |
}
|
2849 |
}
|
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.
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* 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', '4.4.
|
43 |
}
|
44 |
|
45 |
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.4.9
|
14 |
* Author: WebAppick
|
15 |
* Author URI: https://webappick.com/
|
16 |
* License: GPL v2
|
39 |
* @var string
|
40 |
* @since 3.1.6
|
41 |
*/
|
42 |
+
define( 'WOO_FEED_FREE_VERSION', '4.4.9' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|