Version Description
(2019-12-12) = * XML element space replace with underscore issue fixed * Fix: Undefined index. * Trim output * Remove redundant codes
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 3.2.1 |
Comparing to | |
See all releases |
Code changes from version 3.2.0 to 3.2.1
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags:woocommerce,google product feed,facebook product feed,woocommerce product f
|
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.4-alpha-46743
|
7 |
Requires PHP: 5.6
|
8 |
-
Stable tag: 3.2.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -305,6 +305,12 @@ Using pro version:
|
|
305 |
|
306 |
== Changelog ==
|
307 |
|
|
|
|
|
|
|
|
|
|
|
|
|
308 |
= 3.2.0 (2019-12-08) =
|
309 |
* Tweak: Improved Performance.
|
310 |
* stripslashes attribute output
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.4-alpha-46743
|
7 |
Requires PHP: 5.6
|
8 |
+
Stable tag: 3.2.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
305 |
|
306 |
== Changelog ==
|
307 |
|
308 |
+
= 3.2.1 (2019-12-12) =
|
309 |
+
* XML element space replace with underscore issue fixed
|
310 |
+
* Fix: Undefined index.
|
311 |
+
* Trim output
|
312 |
+
* Remove redundant codes
|
313 |
+
|
314 |
= 3.2.0 (2019-12-08) =
|
315 |
* Tweak: Improved Performance.
|
316 |
* stripslashes attribute output
|
admin/partials/woo-feed-admin-display.php
CHANGED
@@ -11,7 +11,6 @@
|
|
11 |
* @author Ohidul Islam <wahid@webappick.com>
|
12 |
*/
|
13 |
|
14 |
-
|
15 |
$dropDown = new Woo_Feed_Dropdown();
|
16 |
$product = new Woo_Feed_Products();
|
17 |
$attributes=new Woo_Feed_Default_Attributes();
|
11 |
* @author Ohidul Islam <wahid@webappick.com>
|
12 |
*/
|
13 |
|
|
|
14 |
$dropDown = new Woo_Feed_Dropdown();
|
15 |
$product = new Woo_Feed_Products();
|
16 |
$attributes=new Woo_Feed_Default_Attributes();
|
includes/classes/class-woo-feed-products-v3.php
CHANGED
@@ -288,6 +288,13 @@ class Woo_Feed_Products_v3 {
|
|
288 |
# Replace XML Nodes according to merchant requirement
|
289 |
$getReplacedAttribute = woo_feed_replace_to_merchant_attribute( $pluginAttribute, $merchant, $feedType );
|
290 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
# Add closing XML node if value is empty
|
292 |
if ( $attributeValue != "" ) {
|
293 |
# Add CDATA wrapper for XML feed to prevent XML error.
|
@@ -302,9 +309,6 @@ class Woo_Feed_Products_v3 {
|
|
302 |
# Strip slash from output
|
303 |
$attributeValue = stripslashes( $attributeValue );
|
304 |
|
305 |
-
# XML does not support space in node. So replace Space with Underscore
|
306 |
-
$getReplacedAttribute = str_replace( " ", "_", $getReplacedAttribute );
|
307 |
-
|
308 |
$this->feedBody .= "<" . $getReplacedAttribute . ">" . "$attributeValue" . "</" . $getReplacedAttribute . ">";
|
309 |
$this->feedBody .= "\n";
|
310 |
|
288 |
# Replace XML Nodes according to merchant requirement
|
289 |
$getReplacedAttribute = woo_feed_replace_to_merchant_attribute( $pluginAttribute, $merchant, $feedType );
|
290 |
|
291 |
+
# XML does not support space in node. So replace Space with Underscore
|
292 |
+
$getReplacedAttribute = str_replace( " ", "_", $getReplacedAttribute );
|
293 |
+
|
294 |
+
if(!empty($attributeValue)){
|
295 |
+
$attributeValue=trim($attributeValue);
|
296 |
+
}
|
297 |
+
|
298 |
# Add closing XML node if value is empty
|
299 |
if ( $attributeValue != "" ) {
|
300 |
# Add CDATA wrapper for XML feed to prevent XML error.
|
309 |
# Strip slash from output
|
310 |
$attributeValue = stripslashes( $attributeValue );
|
311 |
|
|
|
|
|
|
|
312 |
$this->feedBody .= "<" . $getReplacedAttribute . ">" . "$attributeValue" . "</" . $getReplacedAttribute . ">";
|
313 |
$this->feedBody .= "\n";
|
314 |
|
includes/classes/class-woo-feed-products.php
CHANGED
@@ -1881,128 +1881,6 @@ class Woo_Feed_Products {
|
|
1881 |
# Get All WooCommerce Attributes
|
1882 |
$vAttributes = $this->getAllAttributes();
|
1883 |
update_option("wpfw_vAttributes", $vAttributes);
|
1884 |
-
|
1885 |
-
# Get All Custom Attributes
|
1886 |
-
// $customAttributes = $this->getAllCustomAttributes();
|
1887 |
-
// update_option("wpfw_customAttributes", $customAttributes);
|
1888 |
-
}
|
1889 |
-
|
1890 |
-
/**
|
1891 |
-
* Local Attribute List to map product value with merchant attributes
|
1892 |
-
*
|
1893 |
-
* @param string $selected
|
1894 |
-
* @deprecated since 3.1.43
|
1895 |
-
* @return string
|
1896 |
-
*/
|
1897 |
-
public function loadAttributeDropdown($selected = "")
|
1898 |
-
{
|
1899 |
-
$attributes = array(
|
1900 |
-
"id" => "Product Id",
|
1901 |
-
"title" => "Product Title",
|
1902 |
-
"description" => "Product Description",
|
1903 |
-
"short_description" => "Product Short Description",
|
1904 |
-
"product_type" => "Product Local Category",
|
1905 |
-
"link" => "Product URL",
|
1906 |
-
"ex_link" => "External Product URL",
|
1907 |
-
"condition" => "Condition",
|
1908 |
-
"item_group_id" => "Parent Id [Group Id]",
|
1909 |
-
"sku" => "SKU",
|
1910 |
-
"parent_sku" => "Parent SKU",
|
1911 |
-
"availability" => "Availability",
|
1912 |
-
"quantity" => "Quantity",
|
1913 |
-
"price" => "Regular Price",
|
1914 |
-
"current_price" => "Current Price",
|
1915 |
-
"price_with_tax" => "Price with Tax",
|
1916 |
-
"sale_price" => "Sale Price",
|
1917 |
-
"sale_price_sdate" => "Sale Start Date",
|
1918 |
-
"sale_price_edate" => "Sale End Date",
|
1919 |
-
"weight" => "Weight",
|
1920 |
-
"width" => "Width",
|
1921 |
-
"height" => "Height",
|
1922 |
-
"length" => "Length",
|
1923 |
-
"shipping_class" => "Shipping Class",
|
1924 |
-
"type" => "Product Type",
|
1925 |
-
"variation_type" => "Variation Type",
|
1926 |
-
"visibility" => "Visibility",
|
1927 |
-
"rating_total" => "Total Rating",
|
1928 |
-
"rating_average" => "Average Rating",
|
1929 |
-
"tags" => "Tags",
|
1930 |
-
"sale_price_effective_date" => "Sale Price Effective Date",
|
1931 |
-
"is_bundle" => "Is Bundle",
|
1932 |
-
"date_created" => "Date Created",
|
1933 |
-
"date_updated" => "Date Updated",
|
1934 |
-
);
|
1935 |
-
|
1936 |
-
$images = array(
|
1937 |
-
"image" => "Main Image",
|
1938 |
-
"feature_image" => "Featured Image",
|
1939 |
-
"images" => "Images [Comma Separated]",
|
1940 |
-
"image_1" => "Additional Image 1",
|
1941 |
-
"image_2" => "Additional Image 2",
|
1942 |
-
"image_3" => "Additional Image 3",
|
1943 |
-
"image_4" => "Additional Image 4",
|
1944 |
-
"image_5" => "Additional Image 5",
|
1945 |
-
"image_6" => "Additional Image 6",
|
1946 |
-
"image_7" => "Additional Image 7",
|
1947 |
-
"image_8" => "Additional Image 8",
|
1948 |
-
"image_9" => "Additional Image 9",
|
1949 |
-
"image_10" => "Additional Image 10",
|
1950 |
-
);
|
1951 |
-
|
1952 |
-
# Primary Attributes
|
1953 |
-
$str = "<option></option>";
|
1954 |
-
$sltd = "";
|
1955 |
-
$str .= "<optgroup label='Primary Attributes'>";
|
1956 |
-
foreach ($attributes as $key => $value) {
|
1957 |
-
$sltd = "";
|
1958 |
-
if ($selected == $key) {
|
1959 |
-
$sltd = 'selected="selected"';
|
1960 |
-
}
|
1961 |
-
$str .= "<option $sltd value='$key'>" . $value . "</option>";
|
1962 |
-
}
|
1963 |
-
$str .= "</optgroup>";
|
1964 |
-
|
1965 |
-
# Additional Images
|
1966 |
-
if ($images) {
|
1967 |
-
$str .= "<optgroup label='Image Attributes'>";
|
1968 |
-
foreach ($images as $key => $value) {
|
1969 |
-
$sltd = "";
|
1970 |
-
if ($selected == $key) {
|
1971 |
-
$sltd = 'selected="selected"';
|
1972 |
-
}
|
1973 |
-
$str .= "<option $sltd value='$key'>" . $value . "</option>";
|
1974 |
-
}
|
1975 |
-
$str .= "</optgroup>";
|
1976 |
-
}
|
1977 |
-
|
1978 |
-
# Get All WooCommerce Attributes
|
1979 |
-
$vAttributes = get_option("wpfw_vAttributes");
|
1980 |
-
if ($vAttributes) {
|
1981 |
-
$str .= "<optgroup label='Product Attributes'>";
|
1982 |
-
foreach ($vAttributes as $key => $value) {
|
1983 |
-
$sltd = "";
|
1984 |
-
if ($selected == $key) {
|
1985 |
-
$sltd = 'selected="selected"';
|
1986 |
-
}
|
1987 |
-
$str .= "<option $sltd value='$key'>" . $value . "</option>";
|
1988 |
-
}
|
1989 |
-
$str .= "</optgroup>";
|
1990 |
-
}
|
1991 |
-
|
1992 |
-
# Get All Custom Attributes
|
1993 |
-
$customAttributes = get_option("wpfw_customAttributes");
|
1994 |
-
if ($customAttributes) {
|
1995 |
-
$str .= "<optgroup label='Variation & Custom Attributes'>";
|
1996 |
-
foreach ($customAttributes as $key => $value) {
|
1997 |
-
$sltd = "";
|
1998 |
-
if ($selected == $key) {
|
1999 |
-
$sltd = 'selected="selected"';
|
2000 |
-
}
|
2001 |
-
$str .= "<option $sltd value='$key'>" . $value . "</option>";
|
2002 |
-
}
|
2003 |
-
$str .= "</optgroup>";
|
2004 |
-
}
|
2005 |
-
return $str;
|
2006 |
}
|
2007 |
|
2008 |
/**
|
1881 |
# Get All WooCommerce Attributes
|
1882 |
$vAttributes = $this->getAllAttributes();
|
1883 |
update_option("wpfw_vAttributes", $vAttributes);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1884 |
}
|
1885 |
|
1886 |
/**
|
woo-feed.php
CHANGED
@@ -15,7 +15,7 @@
|
|
15 |
* Plugin Name: WooCommerce Product Feed
|
16 |
* Plugin URI: https://webappick.com/
|
17 |
* Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
|
18 |
-
* Version: 3.2.
|
19 |
* Author: WebAppick
|
20 |
* Author URI: https://webappick.com/
|
21 |
* License: GPL v2
|
@@ -41,7 +41,7 @@ if( ! defined( 'WOO_FEED_VERSION' ) ) {
|
|
41 |
* Plugin Version
|
42 |
* @var string
|
43 |
*/
|
44 |
-
define( 'WOO_FEED_VERSION', '3.2.
|
45 |
}
|
46 |
if( ! defined( 'WOO_FEED_FREE_FILE') ) {
|
47 |
/**
|
@@ -772,9 +772,9 @@ if( ! function_exists( 'woo_feed_check_google_category' ) ) {
|
|
772 |
function woo_feed_check_google_category($feedInfo){
|
773 |
|
774 |
# Check Google Product Category for Google & Facebook Template and show message
|
775 |
-
$checkCategory
|
776 |
-
$checkCategoryType
|
777 |
-
$merchant
|
778 |
$cat="yes";
|
779 |
|
780 |
if(in_array($merchant,array('google','facebook')) && in_array("current_category",$checkCategory)){
|
15 |
* Plugin Name: WooCommerce Product Feed
|
16 |
* Plugin URI: https://webappick.com/
|
17 |
* Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
|
18 |
+
* Version: 3.2.1
|
19 |
* Author: WebAppick
|
20 |
* Author URI: https://webappick.com/
|
21 |
* License: GPL v2
|
41 |
* Plugin Version
|
42 |
* @var string
|
43 |
*/
|
44 |
+
define( 'WOO_FEED_VERSION', '3.2.1' );
|
45 |
}
|
46 |
if( ! defined( 'WOO_FEED_FREE_FILE') ) {
|
47 |
/**
|
772 |
function woo_feed_check_google_category($feedInfo){
|
773 |
|
774 |
# Check Google Product Category for Google & Facebook Template and show message
|
775 |
+
$checkCategory = isset( $feedInfo['feedrules']['mattributes'] ) ? $feedInfo['feedrules']['mattributes'] : [];
|
776 |
+
$checkCategoryType = isset( $feedInfo['feedrules']['type'] ) ? $feedInfo['feedrules']['type'] : [];
|
777 |
+
$merchant = isset( $feedInfo['feedrules']['provider'] ) ? $feedInfo['feedrules']['provider'] : [];
|
778 |
$cat="yes";
|
779 |
|
780 |
if(in_array($merchant,array('google','facebook')) && in_array("current_category",$checkCategory)){
|