Version Description
(2021-04-02) = * Tweak: Custom Template without cdata and XML UTF-8 encoding for XML element string.
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 4.3.59 |
Comparing to | |
See all releases |
Code changes from version 4.3.58 to 4.3.59
- README.txt +4 -1
- includes/classes/class-woo-feed-products-v3.php +6 -4
- includes/helper.php +23 -17
- 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.3.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -498,6 +498,9 @@ Using pro version:
|
|
498 |
|
499 |
== Changelog ==
|
500 |
|
|
|
|
|
|
|
501 |
= 4.3.58 (2021-04-01) =
|
502 |
* Fixed: Conflict with XT WooCommerce Variation Swatches plugin has been solved.
|
503 |
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.7
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 4.3.59
|
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.59 (2021-04-02) =
|
502 |
+
* Tweak: Custom Template without cdata and XML UTF-8 encoding for XML element string.
|
503 |
+
|
504 |
= 4.3.58 (2021-04-01) =
|
505 |
* Fixed: Conflict with XT WooCommerce Variation Swatches plugin has been solved.
|
506 |
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -577,12 +577,14 @@ class Woo_Feed_Products_v3
|
|
577 |
// XML does not support space in node. So replace Space with Underscore.
|
578 |
$getReplacedAttribute = str_replace(' ', '_', $getReplacedAttribute);
|
579 |
|
580 |
-
|
581 |
-
|
582 |
-
|
|
|
|
|
583 |
|
584 |
// Add closing XML node if value is empty
|
585 |
-
if ( ''
|
586 |
// Add CDATA wrapper for XML feed to prevent XML error.
|
587 |
$attributeValue = woo_feed_add_cdata($merchant_attribute, $attributeValue, $merchant, $this->config['feedType']);
|
588 |
|
577 |
// XML does not support space in node. So replace Space with Underscore.
|
578 |
$getReplacedAttribute = str_replace(' ', '_', $getReplacedAttribute);
|
579 |
|
580 |
+
// Trim XML Element text & Encode for UTF-8
|
581 |
+
if ( ! empty( $attributeValue ) ) {
|
582 |
+
$attributeValue = trim( $attributeValue );
|
583 |
+
$attributeValue = htmlentities( $attributeValue, ENT_XML1 | ENT_QUOTES, 'UTF-8' );
|
584 |
+
}
|
585 |
|
586 |
// Add closing XML node if value is empty
|
587 |
+
if ( '' !== $attributeValue ) {
|
588 |
// Add CDATA wrapper for XML feed to prevent XML error.
|
589 |
$attributeValue = woo_feed_add_cdata($merchant_attribute, $attributeValue, $merchant, $this->config['feedType']);
|
590 |
|
includes/helper.php
CHANGED
@@ -923,7 +923,7 @@ if ( ! function_exists( 'woo_feed_get_csv_delimiters' ) ) {
|
|
923 |
' ' => 'Space',
|
924 |
'|' => 'Pipe',
|
925 |
';' => 'Semi Colon',
|
926 |
-
|
927 |
];
|
928 |
}
|
929 |
}
|
@@ -2122,6 +2122,10 @@ if ( ! function_exists( 'woo_feed_add_cdata' ) ) {
|
|
2122 |
return "$attributeValue";
|
2123 |
}
|
2124 |
|
|
|
|
|
|
|
|
|
2125 |
if ( "shipping" === $pluginAttribute || "tax" === $pluginAttribute ) {
|
2126 |
return "$attributeValue";
|
2127 |
}
|
@@ -4342,6 +4346,9 @@ if( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4342 |
* @return mixed $price
|
4343 |
*/
|
4344 |
function woo_feed_get_dynamic_discounted_product_price($price, $product, $config, $tax) {
|
|
|
|
|
|
|
4345 |
// When discount rules plugin by flycart is activated, bring the discounted price
|
4346 |
if ( is_plugin_active('woo-discount-rules/woo-discount-rules.php') ) {
|
4347 |
if( class_exists('Wdr\App\Controllers\Configuration') ) {
|
@@ -4359,11 +4366,8 @@ if( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4359 |
|
4360 |
$price = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $price, 'discounted_price', true, true);
|
4361 |
}
|
4362 |
-
}
|
4363 |
-
|
4364 |
-
|
4365 |
-
// When dynamic discount pricing plugin by Acowebs is activated, bring the discounted price
|
4366 |
-
if( is_plugin_active('aco-woo-dynamic-pricing/start.php') ) {
|
4367 |
if( class_exists('AWDP_Discount') ) {
|
4368 |
if( ! $tax ) {
|
4369 |
$price = AWDP_Discount::instance()->calculate_discount($product->get_price(), $product);
|
@@ -4378,11 +4382,9 @@ if( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4378 |
}
|
4379 |
}
|
4380 |
}
|
4381 |
-
}
|
4382 |
-
|
4383 |
|
4384 |
-
|
4385 |
-
|
4386 |
$discount_amount = 0;
|
4387 |
global $wad_discounts;
|
4388 |
if( isset($wad_discounts["product"]) ) {
|
@@ -4405,10 +4407,8 @@ if( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4405 |
|
4406 |
$price = floatval($product->get_price()) - floatval($discount_amount);
|
4407 |
}
|
4408 |
-
}
|
4409 |
-
|
4410 |
-
// When Pricing Deals for WooCommerce discount plugin by Vark is activated, bring the discounted price
|
4411 |
-
if( is_plugin_active('pricing-deals-for-woocommerce/vt-pricing-deals.php') ) {
|
4412 |
if( class_exists('VTPRD_Controller') ) {
|
4413 |
global $vtprd_rules_set;
|
4414 |
$vtprd_rules_set = get_option( 'vtprd_rules_set' );
|
@@ -4427,13 +4427,19 @@ if( ! function_exists('woo_feed_get_dynamic_discounted_product_price') ) {
|
|
4427 |
}
|
4428 |
}
|
4429 |
}
|
|
|
|
|
4430 |
}
|
4431 |
|
4432 |
-
//when tax is
|
4433 |
-
if( $
|
4434 |
-
|
|
|
|
|
|
|
4435 |
}
|
4436 |
|
|
|
4437 |
return $price;
|
4438 |
}
|
4439 |
}
|
923 |
' ' => 'Space',
|
924 |
'|' => 'Pipe',
|
925 |
';' => 'Semi Colon',
|
926 |
+
"\t" => 'TAB',
|
927 |
];
|
928 |
}
|
929 |
}
|
2122 |
return "$attributeValue";
|
2123 |
}
|
2124 |
|
2125 |
+
if ( 'custom' === $merchant ) {
|
2126 |
+
return "$attributeValue";
|
2127 |
+
}
|
2128 |
+
|
2129 |
if ( "shipping" === $pluginAttribute || "tax" === $pluginAttribute ) {
|
2130 |
return "$attributeValue";
|
2131 |
}
|
4346 |
* @return mixed $price
|
4347 |
*/
|
4348 |
function woo_feed_get_dynamic_discounted_product_price($price, $product, $config, $tax) {
|
4349 |
+
|
4350 |
+
$discount_plugin_activate = true;
|
4351 |
+
|
4352 |
// When discount rules plugin by flycart is activated, bring the discounted price
|
4353 |
if ( is_plugin_active('woo-discount-rules/woo-discount-rules.php') ) {
|
4354 |
if( class_exists('Wdr\App\Controllers\Configuration') ) {
|
4366 |
|
4367 |
$price = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $price, 'discounted_price', true, true);
|
4368 |
}
|
4369 |
+
} elseif ( is_plugin_active('aco-woo-dynamic-pricing/start.php') ) {
|
4370 |
+
// When dynamic discount pricing plugin by Acowebs is activated, bring the discounted price
|
|
|
|
|
|
|
4371 |
if( class_exists('AWDP_Discount') ) {
|
4372 |
if( ! $tax ) {
|
4373 |
$price = AWDP_Discount::instance()->calculate_discount($product->get_price(), $product);
|
4382 |
}
|
4383 |
}
|
4384 |
}
|
|
|
|
|
4385 |
|
4386 |
+
} elseif ( is_plugin_active('woo-advanced-discounts/wad.php') ) {
|
4387 |
+
// When discount plugin by Orion is activated, bring the discounted price
|
4388 |
$discount_amount = 0;
|
4389 |
global $wad_discounts;
|
4390 |
if( isset($wad_discounts["product"]) ) {
|
4407 |
|
4408 |
$price = floatval($product->get_price()) - floatval($discount_amount);
|
4409 |
}
|
4410 |
+
} elseif ( is_plugin_active('pricing-deals-for-woocommerce/vt-pricing-deals.php') ) {
|
4411 |
+
// When Pricing Deals for WooCommerce discount plugin by Vark is activated, bring the discounted price
|
|
|
|
|
4412 |
if( class_exists('VTPRD_Controller') ) {
|
4413 |
global $vtprd_rules_set;
|
4414 |
$vtprd_rules_set = get_option( 'vtprd_rules_set' );
|
4427 |
}
|
4428 |
}
|
4429 |
}
|
4430 |
+
} else {
|
4431 |
+
$discount_plugin_activate = false;
|
4432 |
}
|
4433 |
|
4434 |
+
//when any of the discount plugin is activated and tax is enabled calculate the tax
|
4435 |
+
if( $discount_plugin_activate ) {
|
4436 |
+
//when tax is enable
|
4437 |
+
if( $tax ) {
|
4438 |
+
$price = woo_feed_get_price_with_tax($product, $price);
|
4439 |
+
}
|
4440 |
}
|
4441 |
|
4442 |
+
|
4443 |
return $price;
|
4444 |
}
|
4445 |
}
|
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.
|
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.3.
|
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.3.59
|
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.3.59' );
|
43 |
}
|
44 |
|
45 |
if ( ! defined( 'WOO_FEED_FREE_FILE' ) ) {
|