Version Description
Download this release
Release Info
Developer | wahid0003 |
Plugin | CTX Feed – WooCommerce Product Feed Manager Plugin |
Version | 3.0.3 |
Comparing to | |
See all releases |
Code changes from version 3.0.2 to 3.0.3
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://webappick.com
|
|
4 |
Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.1
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -296,6 +296,11 @@ Using pro version:
|
|
296 |
|
297 |
== Changelog ==
|
298 |
|
|
|
|
|
|
|
|
|
|
|
299 |
= 3.0.2(2019-02-15) =
|
300 |
* WordPress version 5.1 compatibility checked
|
301 |
|
4 |
Tags:woocommerce,google product feed,facebook product feed,woocommerce product feed,woocommerce,
|
5 |
Requires at least: 3.6
|
6 |
Tested Up To: 5.1
|
7 |
+
Stable tag: 3.0.3
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
296 |
|
297 |
== Changelog ==
|
298 |
|
299 |
+
= 3.0.3(2019-02-20) =
|
300 |
+
* Price with Tax attribute added
|
301 |
+
* Product date created and date updated attribute added
|
302 |
+
* Google Category notice bug fix
|
303 |
+
|
304 |
= 3.0.2(2019-02-15) =
|
305 |
* WordPress version 5.1 compatibility checked
|
306 |
|
includes/class-woo-feed.php
CHANGED
@@ -70,7 +70,7 @@ class Woo_Feed
|
|
70 |
public function __construct()
|
71 |
{
|
72 |
$this->woo_feed = 'woo-feed';
|
73 |
-
$this->version = '3.0.
|
74 |
|
75 |
$this->load_dependencies();
|
76 |
$this->set_locale();
|
70 |
public function __construct()
|
71 |
{
|
72 |
$this->woo_feed = 'woo-feed';
|
73 |
+
$this->version = '3.0.3';
|
74 |
|
75 |
$this->load_dependencies();
|
76 |
$this->set_locale();
|
includes/classes/class-woo-feed-default-attributes.php
CHANGED
@@ -3856,6 +3856,7 @@ class Woo_Feed_Default_Attributes
|
|
3856 |
"image-url" =>"image-url",
|
3857 |
"availability" =>"availability",
|
3858 |
"mpn" =>"mpn",
|
|
|
3859 |
"---1" =>"",
|
3860 |
"--2" =>"Additional Attributes",
|
3861 |
"delivery-time" =>"delivery-time",
|
@@ -3864,7 +3865,6 @@ class Woo_Feed_Default_Attributes
|
|
3864 |
"warranty" =>"warranty",
|
3865 |
"mobile-url" =>"mobile-url",
|
3866 |
"kelkoo-category-id" =>"kelkoo-category-id",
|
3867 |
-
"sku" =>"sku",
|
3868 |
"colour" =>"colour",
|
3869 |
"unit-price" =>"unit-price",
|
3870 |
"offer-type" =>"offer-type",
|
3856 |
"image-url" =>"image-url",
|
3857 |
"availability" =>"availability",
|
3858 |
"mpn" =>"mpn",
|
3859 |
+
"sku" =>"sku",
|
3860 |
"---1" =>"",
|
3861 |
"--2" =>"Additional Attributes",
|
3862 |
"delivery-time" =>"delivery-time",
|
3865 |
"warranty" =>"warranty",
|
3866 |
"mobile-url" =>"mobile-url",
|
3867 |
"kelkoo-category-id" =>"kelkoo-category-id",
|
|
|
3868 |
"colour" =>"colour",
|
3869 |
"unit-price" =>"unit-price",
|
3870 |
"offer-type" =>"offer-type",
|
includes/classes/class-woo-feed-products.php
CHANGED
@@ -217,6 +217,7 @@ class Woo_Feed_Products
|
|
217 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $simple->get_date_on_sale_from();
|
218 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $simple->get_date_on_sale_to();
|
219 |
$this->productsList[ $this->pi ]['price'] = $simple->get_regular_price();
|
|
|
220 |
$this->productsList[ $this->pi ]['sale_price'] = $simple->get_sale_price();
|
221 |
$this->productsList[ $this->pi ]['weight'] = $simple->get_weight();
|
222 |
$this->productsList[ $this->pi ]['width'] = $simple->get_width();
|
@@ -224,6 +225,8 @@ class Woo_Feed_Products
|
|
224 |
$this->productsList[ $this->pi ]['length'] = $simple->get_length();
|
225 |
$this->productsList[ $this->pi ]['shipping_class'] = $simple->get_shipping_class();
|
226 |
|
|
|
|
|
227 |
|
228 |
# Sale price effective date
|
229 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
@@ -303,7 +306,7 @@ class Woo_Feed_Products
|
|
303 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $external->get_date_on_sale_from();
|
304 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $external->get_date_on_sale_to();
|
305 |
$this->productsList[ $this->pi ]['price'] = $external->get_regular_price();
|
306 |
-
|
307 |
$this->productsList[ $this->pi ]['sale_price'] = $external->get_sale_price();
|
308 |
$this->productsList[ $this->pi ]['weight'] = $external->get_weight();
|
309 |
$this->productsList[ $this->pi ]['width'] = $external->get_width();
|
@@ -311,6 +314,8 @@ class Woo_Feed_Products
|
|
311 |
$this->productsList[ $this->pi ]['length'] = $external->get_length();
|
312 |
$this->productsList[ $this->pi ]['shipping_class'] = $external->get_shipping_class();
|
313 |
|
|
|
|
|
314 |
|
315 |
# Sale price effective date
|
316 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
@@ -397,6 +402,8 @@ class Woo_Feed_Products
|
|
397 |
$this->productsList[ $this->pi ]['length'] = $grouped->get_length();
|
398 |
$this->productsList[ $this->pi ]['shipping_class'] = $grouped->get_shipping_class();
|
399 |
|
|
|
|
|
400 |
|
401 |
# Sale price effective date
|
402 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
@@ -479,6 +486,7 @@ class Woo_Feed_Products
|
|
479 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variable->get_date_on_sale_from();
|
480 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variable->get_date_on_sale_to();
|
481 |
$this->productsList[ $this->pi ]['price'] = $variable->get_variation_regular_price();
|
|
|
482 |
$this->productsList[ $this->pi ]['sale_price'] = $variable->get_variation_sale_price();
|
483 |
$this->productsList[ $this->pi ]['weight'] = $variable->get_weight();
|
484 |
$this->productsList[ $this->pi ]['width'] = $variable->get_width();
|
@@ -486,6 +494,8 @@ class Woo_Feed_Products
|
|
486 |
$this->productsList[ $this->pi ]['length'] = $variable->get_length();
|
487 |
$this->productsList[ $this->pi ]['shipping_class'] = $variable->get_shipping_class();
|
488 |
|
|
|
|
|
489 |
|
490 |
# Sale price effective date
|
491 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
@@ -604,6 +614,7 @@ class Woo_Feed_Products
|
|
604 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variation->get_date_on_sale_from();
|
605 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variation->get_date_on_sale_to();
|
606 |
$this->productsList[ $this->pi ]['price'] = $variation->get_regular_price();
|
|
|
607 |
$this->productsList[ $this->pi ]['sale_price'] = $variation->get_sale_price();
|
608 |
$this->productsList[ $this->pi ]['weight'] = $variation->get_weight();
|
609 |
$this->productsList[ $this->pi ]['width'] = $variation->get_width();
|
@@ -611,6 +622,8 @@ class Woo_Feed_Products
|
|
611 |
$this->productsList[ $this->pi ]['length'] = $variation->get_length();
|
612 |
$this->productsList[ $this->pi ]['shipping_class'] = $variation->get_shipping_class();
|
613 |
|
|
|
|
|
614 |
|
615 |
# Sale price effective date
|
616 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
@@ -773,6 +786,7 @@ class Woo_Feed_Products
|
|
773 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variation->get_date_on_sale_from();
|
774 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variation->get_date_on_sale_to();
|
775 |
$this->productsList[ $this->pi ]['price'] = $variation->get_regular_price();
|
|
|
776 |
$this->productsList[ $this->pi ]['sale_price'] = $variation->get_sale_price();
|
777 |
$this->productsList[ $this->pi ]['weight'] = $variation->get_weight();
|
778 |
$this->productsList[ $this->pi ]['width'] = $variation->get_width();
|
@@ -1824,6 +1838,7 @@ class Woo_Feed_Products
|
|
1824 |
"availability" => "Availability",
|
1825 |
"quantity" => "Quantity",
|
1826 |
"price" => "Regular Price",
|
|
|
1827 |
"sale_price" => "Sale Price",
|
1828 |
"sale_price_sdate" => "Sale Start Date",
|
1829 |
"sale_price_edate" => "Sale End Date",
|
@@ -1840,6 +1855,8 @@ class Woo_Feed_Products
|
|
1840 |
"tags" => "Tags",
|
1841 |
"sale_price_effective_date" => "Sale Price Effective Date",
|
1842 |
"is_bundle" => "Is Bundle",
|
|
|
|
|
1843 |
);
|
1844 |
|
1845 |
$images = array(
|
@@ -1954,6 +1971,7 @@ class Woo_Feed_Products
|
|
1954 |
"availability" => "Availability",
|
1955 |
"quantity" => "Quantity",
|
1956 |
"price" => "Regular Price",
|
|
|
1957 |
"sale_price" => "Sale Price",
|
1958 |
"sale_price_sdate" => "Sale Start Date",
|
1959 |
"sale_price_edate" => "Sale End Date",
|
@@ -1970,6 +1988,8 @@ class Woo_Feed_Products
|
|
1970 |
"tags" => "Tags",
|
1971 |
"sale_price_effective_date" => "Sale Price Effective Date",
|
1972 |
"is_bundle" => "Is Bundle",
|
|
|
|
|
1973 |
);
|
1974 |
|
1975 |
$images = array(
|
@@ -2058,4 +2078,26 @@ class Woo_Feed_Products
|
|
2058 |
}
|
2059 |
return false;
|
2060 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2061 |
}
|
217 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $simple->get_date_on_sale_from();
|
218 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $simple->get_date_on_sale_to();
|
219 |
$this->productsList[ $this->pi ]['price'] = $simple->get_regular_price();
|
220 |
+
$this->productsList[ $this->pi ]['price_with_tax'] = $this->getPriceWithTax($simple);
|
221 |
$this->productsList[ $this->pi ]['sale_price'] = $simple->get_sale_price();
|
222 |
$this->productsList[ $this->pi ]['weight'] = $simple->get_weight();
|
223 |
$this->productsList[ $this->pi ]['width'] = $simple->get_width();
|
225 |
$this->productsList[ $this->pi ]['length'] = $simple->get_length();
|
226 |
$this->productsList[ $this->pi ]['shipping_class'] = $simple->get_shipping_class();
|
227 |
|
228 |
+
$this->productsList[ $this->pi ]['date_created'] = $this->format_product_date($simple->get_date_created());
|
229 |
+
$this->productsList[ $this->pi ]['date_updated'] = $this->format_product_date($simple->get_date_modified());
|
230 |
|
231 |
# Sale price effective date
|
232 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
306 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $external->get_date_on_sale_from();
|
307 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $external->get_date_on_sale_to();
|
308 |
$this->productsList[ $this->pi ]['price'] = $external->get_regular_price();
|
309 |
+
$this->productsList[ $this->pi ]['price_with_tax'] = $this->getPriceWithTax($external);
|
310 |
$this->productsList[ $this->pi ]['sale_price'] = $external->get_sale_price();
|
311 |
$this->productsList[ $this->pi ]['weight'] = $external->get_weight();
|
312 |
$this->productsList[ $this->pi ]['width'] = $external->get_width();
|
314 |
$this->productsList[ $this->pi ]['length'] = $external->get_length();
|
315 |
$this->productsList[ $this->pi ]['shipping_class'] = $external->get_shipping_class();
|
316 |
|
317 |
+
$this->productsList[ $this->pi ]['date_created'] = $this->format_product_date($external->get_date_created());
|
318 |
+
$this->productsList[ $this->pi ]['date_updated'] = $this->format_product_date($external->get_date_modified());
|
319 |
|
320 |
# Sale price effective date
|
321 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
402 |
$this->productsList[ $this->pi ]['length'] = $grouped->get_length();
|
403 |
$this->productsList[ $this->pi ]['shipping_class'] = $grouped->get_shipping_class();
|
404 |
|
405 |
+
$this->productsList[ $this->pi ]['date_created'] = $this->format_product_date($grouped->get_date_created());
|
406 |
+
$this->productsList[ $this->pi ]['date_updated'] = $this->format_product_date($grouped->get_date_modified());
|
407 |
|
408 |
# Sale price effective date
|
409 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
486 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variable->get_date_on_sale_from();
|
487 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variable->get_date_on_sale_to();
|
488 |
$this->productsList[ $this->pi ]['price'] = $variable->get_variation_regular_price();
|
489 |
+
$this->productsList[ $this->pi ]['price_with_tax'] = $this->getPriceWithTax($variable);
|
490 |
$this->productsList[ $this->pi ]['sale_price'] = $variable->get_variation_sale_price();
|
491 |
$this->productsList[ $this->pi ]['weight'] = $variable->get_weight();
|
492 |
$this->productsList[ $this->pi ]['width'] = $variable->get_width();
|
494 |
$this->productsList[ $this->pi ]['length'] = $variable->get_length();
|
495 |
$this->productsList[ $this->pi ]['shipping_class'] = $variable->get_shipping_class();
|
496 |
|
497 |
+
$this->productsList[ $this->pi ]['date_created'] = $this->format_product_date($variable->get_date_created());
|
498 |
+
$this->productsList[ $this->pi ]['date_updated'] = $this->format_product_date($variable->get_date_modified());
|
499 |
|
500 |
# Sale price effective date
|
501 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
614 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variation->get_date_on_sale_from();
|
615 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variation->get_date_on_sale_to();
|
616 |
$this->productsList[ $this->pi ]['price'] = $variation->get_regular_price();
|
617 |
+
$this->productsList[ $this->pi ]['price_with_tax'] = $this->getPriceWithTax($variation);
|
618 |
$this->productsList[ $this->pi ]['sale_price'] = $variation->get_sale_price();
|
619 |
$this->productsList[ $this->pi ]['weight'] = $variation->get_weight();
|
620 |
$this->productsList[ $this->pi ]['width'] = $variation->get_width();
|
622 |
$this->productsList[ $this->pi ]['length'] = $variation->get_length();
|
623 |
$this->productsList[ $this->pi ]['shipping_class'] = $variation->get_shipping_class();
|
624 |
|
625 |
+
$this->productsList[ $this->pi ]['date_created'] = $this->format_product_date($variation->get_date_created());
|
626 |
+
$this->productsList[ $this->pi ]['date_updated'] = $this->format_product_date($variation->get_date_modified());
|
627 |
|
628 |
# Sale price effective date
|
629 |
$from = $this->sale_price_effective_date( $id, '_sale_price_dates_from' );
|
786 |
$this->productsList[ $this->pi ]['sale_price_sdate'] = $variation->get_date_on_sale_from();
|
787 |
$this->productsList[ $this->pi ]['sale_price_edate'] = $variation->get_date_on_sale_to();
|
788 |
$this->productsList[ $this->pi ]['price'] = $variation->get_regular_price();
|
789 |
+
$this->productsList[ $this->pi ]['price_with_tax'] = $this->getPriceWithTax($variation);
|
790 |
$this->productsList[ $this->pi ]['sale_price'] = $variation->get_sale_price();
|
791 |
$this->productsList[ $this->pi ]['weight'] = $variation->get_weight();
|
792 |
$this->productsList[ $this->pi ]['width'] = $variation->get_width();
|
1838 |
"availability" => "Availability",
|
1839 |
"quantity" => "Quantity",
|
1840 |
"price" => "Regular Price",
|
1841 |
+
"price_with_tax" => "Price with Tax",
|
1842 |
"sale_price" => "Sale Price",
|
1843 |
"sale_price_sdate" => "Sale Start Date",
|
1844 |
"sale_price_edate" => "Sale End Date",
|
1855 |
"tags" => "Tags",
|
1856 |
"sale_price_effective_date" => "Sale Price Effective Date",
|
1857 |
"is_bundle" => "Is Bundle",
|
1858 |
+
"date_created" => "Date Created",
|
1859 |
+
"date_updated" => "Date Updated",
|
1860 |
);
|
1861 |
|
1862 |
$images = array(
|
1971 |
"availability" => "Availability",
|
1972 |
"quantity" => "Quantity",
|
1973 |
"price" => "Regular Price",
|
1974 |
+
"price_with_tax" => "Price with Tax",
|
1975 |
"sale_price" => "Sale Price",
|
1976 |
"sale_price_sdate" => "Sale Start Date",
|
1977 |
"sale_price_edate" => "Sale End Date",
|
1988 |
"tags" => "Tags",
|
1989 |
"sale_price_effective_date" => "Sale Price Effective Date",
|
1990 |
"is_bundle" => "Is Bundle",
|
1991 |
+
"date_created" => "Date Created",
|
1992 |
+
"date_updated" => "Date Updated",
|
1993 |
);
|
1994 |
|
1995 |
$images = array(
|
2078 |
}
|
2079 |
return false;
|
2080 |
}
|
2081 |
+
|
2082 |
+
/** Return product price with tax
|
2083 |
+
* @param $product
|
2084 |
+
* @return float|string
|
2085 |
+
*/
|
2086 |
+
public function getPriceWithTax($product)
|
2087 |
+
{
|
2088 |
+
if(woo_feed_wc_version_check(3.0)){
|
2089 |
+
return wc_get_price_including_tax($product,array('price'=>$product->get_price()));
|
2090 |
+
}else{
|
2091 |
+
return $product->get_price_including_tax();
|
2092 |
+
}
|
2093 |
+
}
|
2094 |
+
|
2095 |
+
/** Format product created & updated date
|
2096 |
+
* @param $date
|
2097 |
+
* @return false|string
|
2098 |
+
*/
|
2099 |
+
public function format_product_date($date)
|
2100 |
+
{
|
2101 |
+
return date("Y-m-d",strtotime($date));
|
2102 |
+
}
|
2103 |
}
|
woo-feed.php
CHANGED
@@ -16,7 +16,7 @@
|
|
16 |
* Plugin Name: WooCommerce Product Feed
|
17 |
* Plugin URI: https://webappick.com/
|
18 |
* Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
|
19 |
-
* Version: 3.0.
|
20 |
* Author: WebAppick
|
21 |
* Author URI: https://webappick.com/
|
22 |
* License: GPL v2
|
@@ -662,7 +662,8 @@ function woo_feed_check_google_category($feedInfo){
|
|
662 |
$checkCategory=$feedInfo['feedrules']['mattributes'];
|
663 |
$checkCategoryType=$feedInfo['feedrules']['type'];
|
664 |
$merchant=$feedInfo['feedrules']['provider'];
|
665 |
-
$cat="
|
|
|
666 |
if(in_array($merchant,array('google','facebook')) && in_array("current_category",$checkCategory)){
|
667 |
$catKey=array_search('current_category',$checkCategory);
|
668 |
if($checkCategoryType[$catKey]=="pattern"){
|
@@ -671,8 +672,8 @@ function woo_feed_check_google_category($feedInfo){
|
|
671 |
$checkCategoryValue=$feedInfo['feedrules']['attributes'];
|
672 |
}
|
673 |
|
674 |
-
if(
|
675 |
-
$cat="
|
676 |
}
|
677 |
}
|
678 |
return $cat;
|
16 |
* Plugin Name: WooCommerce Product Feed
|
17 |
* Plugin URI: https://webappick.com/
|
18 |
* Description: This plugin generate WooCommerce product feed for Shopping Engines like Google Shopping,Facebook Product Feed,eBay,Amazon,Idealo and many more..
|
19 |
+
* Version: 3.0.3
|
20 |
* Author: WebAppick
|
21 |
* Author URI: https://webappick.com/
|
22 |
* License: GPL v2
|
662 |
$checkCategory=$feedInfo['feedrules']['mattributes'];
|
663 |
$checkCategoryType=$feedInfo['feedrules']['type'];
|
664 |
$merchant=$feedInfo['feedrules']['provider'];
|
665 |
+
$cat="yes";
|
666 |
+
|
667 |
if(in_array($merchant,array('google','facebook')) && in_array("current_category",$checkCategory)){
|
668 |
$catKey=array_search('current_category',$checkCategory);
|
669 |
if($checkCategoryType[$catKey]=="pattern"){
|
672 |
$checkCategoryValue=$feedInfo['feedrules']['attributes'];
|
673 |
}
|
674 |
|
675 |
+
if(empty($checkCategoryValue[$catKey])){
|
676 |
+
$cat="no";
|
677 |
}
|
678 |
}
|
679 |
return $cat;
|