Product Feed PRO for WooCommerce - Version 7.8.6

Version Description

Solved WPML PHP noticed for products without a product ID

Download this release

Release Info

Developer jorisverwater
Plugin Icon 128x128 Product Feed PRO for WooCommerce
Version 7.8.6
Comparing to
See all releases

Code changes from version 7.8.5 to 7.8.6

classes/class-get-products.php CHANGED
@@ -2260,19 +2260,22 @@ class WooSEA_Get_Products {
2260
  $product_data['sale_price'] = apply_filters('wcml_raw_price_amount', $product_data['sale_price'], $project_config['WCML']);
2261
 
2262
  // When WCML manual prices have been entered
2263
- global $woocommerce_wpml;
2264
- $custom_prices = $woocommerce_wpml->get_multi_currency()->custom_prices->get_product_custom_prices( $product_data['id'], $project_config['WCML'] );
 
 
2265
 
2266
- if($custom_prices['_price'] > 0){
2267
- $product_data['price'] = $custom_prices['_price'];
2268
- }
2269
 
2270
- if($custom_prices['_regular_price'] > 0){
2271
- $product_data['regular_price'] = $custom_prices['_regular_price'];
2272
- }
2273
 
2274
- if($custom_prices['_sale_price'] > 0){
2275
- $product_data['sale_price'] = $custom_prices['_sale_price'];
 
2276
  }
2277
  }
2278
 
2260
  $product_data['sale_price'] = apply_filters('wcml_raw_price_amount', $product_data['sale_price'], $project_config['WCML']);
2261
 
2262
  // When WCML manual prices have been entered
2263
+ // Make sure the product ID is not NULL either
2264
+ if(!is_null($product_data['id'])){
2265
+ global $woocommerce_wpml;
2266
+ $custom_prices = $woocommerce_wpml->get_multi_currency()->custom_prices->get_product_custom_prices( $product_data['id'], $project_config['WCML'] );
2267
 
2268
+ if($custom_prices['_price'] > 0){
2269
+ $product_data['price'] = $custom_prices['_price'];
2270
+ }
2271
 
2272
+ if($custom_prices['_regular_price'] > 0){
2273
+ $product_data['regular_price'] = $custom_prices['_regular_price'];
2274
+ }
2275
 
2276
+ if($custom_prices['_sale_price'] > 0){
2277
+ $product_data['sale_price'] = $custom_prices['_sale_price'];
2278
+ }
2279
  }
2280
  }
2281
 
js/woosea_add_cart.js CHANGED
@@ -55,11 +55,11 @@ jQuery(document).ready(function($) {
55
  }
56
 
57
  $.post(frontEndAjax.ajaxurl, inputdata, function( response ) {
58
- fbq('track', 'AddToCart', {
59
  content_ids: "['" + response.product_id + "']",
60
  content_name: response.product_name,
61
  content_category: response.product_cats,
62
- content_type: 'product',
63
  value: response.product_price,
64
  currency: response.product_currency,
65
  });
@@ -87,11 +87,11 @@ jQuery(document).ready(function($) {
87
 
88
  $.post(frontEndAjax.ajaxurl, inputdata, function( response ) {
89
 
90
- fbq('track', 'AddToCart', {
91
  content_ids: "['" + response.product_id + "']",
92
  content_name: response.product_name,
93
  content_category: response.product_cats,
94
- content_type: 'product',
95
  value: response.product_price,
96
  currency: response.product_currency,
97
  });
55
  }
56
 
57
  $.post(frontEndAjax.ajaxurl, inputdata, function( response ) {
58
+ fbq("track", "AddToCart", {
59
  content_ids: "['" + response.product_id + "']",
60
  content_name: response.product_name,
61
  content_category: response.product_cats,
62
+ content_type: "product",
63
  value: response.product_price,
64
  currency: response.product_currency,
65
  });
87
 
88
  $.post(frontEndAjax.ajaxurl, inputdata, function( response ) {
89
 
90
+ fbq("track", "AddToCart", {
91
  content_ids: "['" + response.product_id + "']",
92
  content_name: response.product_name,
93
  content_category: response.product_cats,
94
+ content_type: "product",
95
  value: response.product_price,
96
  currency: response.product_currency,
97
  });
js/woosea_key.js CHANGED
@@ -27,7 +27,7 @@ jQuery(document).ready(function($) {
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
- url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=7.8.5',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
27
  var license_key = $('#license-key').val();
28
 
29
  jQuery.ajax({
30
+ url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=7.8.6',
31
  jsonp: 'callback',
32
  dataType: 'jsonp',
33
  type: 'GET',
readme.txt CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.4
8
- Stable tag: 7.8.4
9
 
10
  == Description ==
11
 
@@ -312,6 +312,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
312
 
313
  === Changelog ===
314
 
 
 
 
315
  = 7.8.5 (2020-04-02) =
316
  * Tested and approved compatibility with Wordpress 5.4
317
 
@@ -2498,6 +2501,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2498
 
2499
  == Upgrade Notice ==
2500
 
 
 
 
2501
  = 7.8.5 =
2502
  Tested and approved compatibility with Wordpress 5.4
2503
 
5
  Tags: Product Feed, Google Shopping, Google Shopping Feed, WooCommerce Product Feed, WooCommerce Product Feed PRO, Bing Shopping, Bing product feed, Bing remarking, Google Merchant Feed, Google DRM Feed, Google Dynamic Remarketing Feed, Facebook feed, Google feed, Bing feed, Facebook Product Feed, Facebook Dynamic remarketing, Data Feed, WooCommerce Feed, XML product feed, CSV product feed, TSV, TXT product feed, comparison shopping engines, comparison shopping websites, vergelijk.nl, vergelijk.be, vertaa.fi, beslist.nl, kieskeurig.nl, bol.com, raketten, pricerunner, pricegrabber, Buy, leGuide, Kelkoo, Twenga, Yandex, Etsy, Dealtime, Shopzilla, Billiger, Google Product Review feed
6
  Requires at least: 4.5
7
  Tested up to: 5.4
8
+ Stable tag: 7.8.6
9
 
10
  == Description ==
11
 
312
 
313
  === Changelog ===
314
 
315
+ = 7.8.6 (2020-04-07) =
316
+ * Solved WPML PHP noticed for products without a product ID
317
+
318
  = 7.8.5 (2020-04-02) =
319
  * Tested and approved compatibility with Wordpress 5.4
320
 
2501
 
2502
  == Upgrade Notice ==
2503
 
2504
+ = 7.8.6 =
2505
+ Solved WPML PHP noticed for products without a product ID
2506
+
2507
  = 7.8.5 =
2508
  Tested and approved compatibility with Wordpress 5.4
2509
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.8.4
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
- define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.8.4' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -403,7 +403,7 @@ function woosea_add_facebook_pixel( $product = null ){
403
  $fb_price = $fb_lowprice;
404
  }
405
  }
406
- $viewContent = "fbq('track','ViewContent',{content_category:'$cats', content_name:'$product_name', content_type:'product', content_ids:['$fb_prodid'], value: $fb_price, currency: '$currency'});";
407
  } else {
408
  // This is a parent variable product
409
  // Since these are not allowed in the feed, at the variations product ID's
@@ -427,11 +427,11 @@ function woosea_add_facebook_pixel( $product = null ){
427
  $fb_highprice = wc_format_decimal( $highest, wc_get_price_decimals() );
428
  $fb_price = $fb_lowprice;
429
  }
430
- $viewContent = "fbq('track','ViewContent',{content_category:'$cats', content_name:'$product_name', content_type:'product_group', content_ids:[$content], value: $fb_price, currency:'$currency'});";
431
  }
432
  } else {
433
  $fb_price = wc_format_decimal( $product->get_price(), wc_get_price_decimals() );
434
- $viewContent = "fbq('track','ViewContent',{content_category:'$cats', content_name:'$product_name', content_type:'product', content_ids:['$fb_prodid'], value: $fb_price, currency:'$currency'});";
435
  }
436
  }
437
  }
@@ -460,7 +460,7 @@ function woosea_add_facebook_pixel( $product = null ){
460
  }
461
  }
462
  $contents = rtrim($contents, ",");
463
- $viewContent = "fbq('track','Purchase',{currency:'$currency', value:$order_real, content_type: 'product', contents:[$contents]});";
464
  }
465
  } else {
466
  // This is on the cart page itself
@@ -488,10 +488,10 @@ function woosea_add_facebook_pixel( $product = null ){
488
 
489
  // User is on the billing pages
490
  if($checkoutpage == $current_url){
491
- $viewContent = "fbq('track','InitiateCheckout',{currency:'$currency', value:$cart_real, content_type:'product', content_ids:[$contents]});";
492
  } else {
493
  // User is on the basket page
494
- $viewContent = "fbq('track','AddToCart',{currency:'$currency', value:$cart_real, content_type:'product', content_ids:[$contents]});";
495
  }
496
  }
497
  }
@@ -571,8 +571,8 @@ function woosea_add_facebook_pixel( $product = null ){
571
  t.src=v;s=b.getElementsByTagName(e)[0];
572
  s.parentNode.insertBefore(t,s)}(window, document,'script',
573
  'https://connect.facebook.net/en_US/fbevents.js');
574
- fbq('init', '<?php print"$facebook_pixel_id";?>');
575
- fbq('track', 'PageView');
576
  <?php
577
  if(strlen($viewContent) > 2){
578
  print"$viewContent";
@@ -4240,7 +4240,7 @@ function woosea_license_valid(){
4240
 
4241
  if(!empty($license_information['license_key'])){
4242
  $curl = curl_init();
4243
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.8.4";
4244
 
4245
  curl_setopt_array($curl, array(
4246
  CURLOPT_RETURNTRANSFER => 1,
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.8.6
5
  * Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
6
  * Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Yandex, Comparison shopping websites and over a 100 channels more.
7
  * Author: AdTribes.io
48
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.8.6' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
403
  $fb_price = $fb_lowprice;
404
  }
405
  }
406
+ $viewContent = "fbq(\"track\",\"ViewContent\",{content_category:\"$cats\", content_name:\"$product_name\", content_type:\"product\", content_ids:[\"$fb_prodid\"], value:\"$fb_price\", currency:\"$currency\"});";
407
  } else {
408
  // This is a parent variable product
409
  // Since these are not allowed in the feed, at the variations product ID's
427
  $fb_highprice = wc_format_decimal( $highest, wc_get_price_decimals() );
428
  $fb_price = $fb_lowprice;
429
  }
430
+ $viewContent = "fbq(\"track\",\"ViewContent\",{content_category:\"$cats\", content_name:\"$product_name\", content_type:\"product_group\", content_ids:[\"$content\"], value:\"$fb_price\", currency:\"$currency\"});";
431
  }
432
  } else {
433
  $fb_price = wc_format_decimal( $product->get_price(), wc_get_price_decimals() );
434
+ $viewContent = "fbq(\"track\",\"ViewContent\",{content_category:\"$cats\", content_name:\"$product_name\", content_type:\"product\", content_ids:[\"$fb_prodid\"], value:\"$fb_price\", currency:\"$currency\"});";
435
  }
436
  }
437
  }
460
  }
461
  }
462
  $contents = rtrim($contents, ",");
463
+ $viewContent = "fbq(\"track\",\"Purchase\",{currency:\"$currency\", value:\"$order_real\", content_type:\"product\", contents:[\"$contents\"]});";
464
  }
465
  } else {
466
  // This is on the cart page itself
488
 
489
  // User is on the billing pages
490
  if($checkoutpage == $current_url){
491
+ $viewContent = "fbq(\"track\",\"InitiateCheckout\",{currency:\"$currency\", value:\"$cart_real\", content_type:\"product\", content_ids:[\"$contents\"]});";
492
  } else {
493
  // User is on the basket page
494
+ $viewContent = "fbq(\"track\",\"AddToCart\",{currency:\"$currency\", value:\"$cart_real\", content_type:\"product\", content_ids:[\"$contents\"]});";
495
  }
496
  }
497
  }
571
  t.src=v;s=b.getElementsByTagName(e)[0];
572
  s.parentNode.insertBefore(t,s)}(window, document,'script',
573
  'https://connect.facebook.net/en_US/fbevents.js');
574
+ fbq("init", "<?php print"$facebook_pixel_id";?>");
575
+ fbq("track", "PageView");
576
  <?php
577
  if(strlen($viewContent) > 2){
578
  print"$viewContent";
4240
 
4241
  if(!empty($license_information['license_key'])){
4242
  $curl = curl_init();
4243
+ $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.8.6";
4244
 
4245
  curl_setopt_array($curl, array(
4246
  CURLOPT_RETURNTRANSFER => 1,