Product Feed PRO for WooCommerce - Version 7.2.4

Version Description

Added the InitiateCheckout event for the Facebook pixel Fixed a structured data pricing bug. When prices were inserted in WooCommerce excluding tax but shown on the website including tax the structured data price was wrong. This has been fixed now.

Download this release

Release Info

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

Code changes from version 7.2.3 to 7.2.4

Files changed (3) hide show
  1. js/woosea_key.js +1 -1
  2. readme.txt +9 -1
  3. woocommerce-sea.php +28 -10
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.2.3',
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.2.4',
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.3
8
- Stable tag: 7.2.3
9
 
10
  == Description ==
11
 
@@ -309,6 +309,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
309
 
310
  === Changelog ===
311
 
 
 
 
 
312
  = 7.2.3 (2020-01-17) =
313
  * Added the variation product ID's to the Facebook pixel events on category and search pages
314
 
@@ -2292,6 +2296,10 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
2292
 
2293
  == Upgrade Notice ==
2294
 
 
 
 
 
2295
  = 7.2.3 =
2296
  Added the variation product ID's to the Facebook pixel events on category and search pages
2297
 
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.3
8
+ Stable tag: 7.2.4
9
 
10
  == Description ==
11
 
309
 
310
  === Changelog ===
311
 
312
+ = 7.2.4 (2020-01-17) =
313
+ * Added the InitiateCheckout event for the Facebook pixel
314
+ * Fixed a structured data pricing bug. When prices were inserted in WooCommerce excluding tax but shown on the website including tax the structured data price was wrong. This has been fixed now.
315
+
316
  = 7.2.3 (2020-01-17) =
317
  * Added the variation product ID's to the Facebook pixel events on category and search pages
318
 
2296
 
2297
  == Upgrade Notice ==
2298
 
2299
+ = 7.2.4 =
2300
+ Added the InitiateCheckout event for the Facebook pixel
2301
+ Fixed a structured data pricing bug. When prices were inserted in WooCommerce excluding tax but shown on the website including tax the structured data price was wrong. This has been fixed now.
2302
+
2303
  = 7.2.3 =
2304
  Added the variation product ID's to the Facebook pixel events on category and search pages
2305
 
woocommerce-sea.php CHANGED
@@ -1,7 +1,7 @@
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
- * Version: 7.2.3
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.2.3' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
@@ -426,6 +426,7 @@ function woosea_add_facebook_pixel( $product = null ){
426
  }
427
  }
428
  } elseif ($fb_pagetype == "cart"){
 
429
  // This is on the order thank you page
430
  if(!empty($_GET)){
431
  $order_string = sanitize_text_field($_GET['key']);
@@ -458,6 +459,9 @@ function woosea_add_facebook_pixel( $product = null ){
458
  $cart_real = 0;
459
  $contents = "";
460
 
 
 
 
461
  if( !is_wp_error( $cart_items )) {
462
  foreach( $cart_items as $cart_id => $cart_item) {
463
  $prod_id = $cart_item['product_id'];
@@ -471,7 +475,14 @@ function woosea_add_facebook_pixel( $product = null ){
471
 
472
  }
473
  $contents = rtrim($contents, ",");
474
- $viewContent = "fbq(\"trackCustom\",\"AddToCart\",{currency:\"$currency\", value:\"$cart_real\", content_type:\"product\", content_ids:\"[$contents]\"});";
 
 
 
 
 
 
 
475
  }
476
  }
477
  } elseif ($fb_pagetype == "category"){
@@ -1173,10 +1184,14 @@ function woosea_product_delete_meta_price( $product = null ) {
1173
 
1174
  if( (isset($variation_id)) AND ( is_object( $variable_product ) ) ) {
1175
  $qty = 1;
1176
- $product_price = wc_get_price_to_display($variable_product, array('qty' => $qty));
1177
-
1178
- $product_price = $variable_product->get_price();
1179
- $structured_vat = get_option ('structured_vat');
 
 
 
 
1180
  if($structured_vat == "yes"){
1181
  $tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
1182
 
@@ -1305,10 +1320,13 @@ function woosea_product_delete_meta_price( $product = null ) {
1305
  }
1306
  } else {
1307
  // Workaround for price caching issues
1308
- $product_price = $product->get_price();
 
1309
 
1310
  $structured_vat = get_option ('structured_vat');
1311
- if($structured_vat == "yes"){
 
 
1312
  $tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
1313
  if(!empty($tax_rates)){
1314
  $tax_rates[1]['rate'] = 0;
@@ -3689,7 +3707,7 @@ function woosea_license_valid(){
3689
 
3690
  if(!empty($license_information['license_key'])){
3691
  $curl = curl_init();
3692
- $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.2.3";
3693
 
3694
  curl_setopt_array($curl, array(
3695
  CURLOPT_RETURNTRANSFER => 1,
1
  <?php
2
  /**
3
  * Plugin Name: Product Feed PRO for WooCommerce
4
+ * Version: 7.2.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
  * Plugin versionnumber, please do not override.
49
  * Define some constants
50
  */
51
+ define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '7.2.4' );
52
  define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
53
  define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
54
 
426
  }
427
  }
428
  } elseif ($fb_pagetype == "cart"){
429
+
430
  // This is on the order thank you page
431
  if(!empty($_GET)){
432
  $order_string = sanitize_text_field($_GET['key']);
459
  $cart_real = 0;
460
  $contents = "";
461
 
462
+ $checkoutpage = wc_get_checkout_url();
463
+ $current_url = get_permalink(get_the_ID());
464
+
465
  if( !is_wp_error( $cart_items )) {
466
  foreach( $cart_items as $cart_id => $cart_item) {
467
  $prod_id = $cart_item['product_id'];
475
 
476
  }
477
  $contents = rtrim($contents, ",");
478
+
479
+ // User is on the billing pages
480
+ if($checkoutpage == $current_url){
481
+ $viewContent = "fbq(\"trackCustom\",\"InitiateCheckout\",{currency:\"$currency\", value:\"$cart_real\", content_type:\"product\", content_ids:\"[$contents]\"});";
482
+ } else {
483
+ // User is on the basket page
484
+ $viewContent = "fbq(\"trackCustom\",\"AddToCart\",{currency:\"$currency\", value:\"$cart_real\", content_type:\"product\", content_ids:\"[$contents]\"});";
485
+ }
486
  }
487
  }
488
  } elseif ($fb_pagetype == "category"){
1184
 
1185
  if( (isset($variation_id)) AND ( is_object( $variable_product ) ) ) {
1186
  $qty = 1;
1187
+ //$product_price = wc_get_price_to_display($variable_product, array('qty' => $qty));
1188
+ //$product_price = $variable_product->get_price();
1189
+
1190
+ // on default show prices including tax
1191
+ $product_price = wc_get_price_including_tax($variable_product);
1192
+ $structured_vat = get_option ('structured_vat');
1193
+
1194
+ // user requested to have prices without tax
1195
  if($structured_vat == "yes"){
1196
  $tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
1197
 
1320
  }
1321
  } else {
1322
  // Workaround for price caching issues
1323
+ // By default show prices including tax
1324
+ $product_price = wc_get_price_including_tax($product);
1325
 
1326
  $structured_vat = get_option ('structured_vat');
1327
+
1328
+ // Use prices excluding tax
1329
+ if($structured_vat == "yes"){
1330
  $tax_rates = WC_Tax::get_base_tax_rates( $product->get_tax_class() );
1331
  if(!empty($tax_rates)){
1332
  $tax_rates[1]['rate'] = 0;
3707
 
3708
  if(!empty($license_information['license_key'])){
3709
  $curl = curl_init();
3710
+ $url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.2.4";
3711
 
3712
  curl_setopt_array($curl, array(
3713
  CURLOPT_RETURNTRANSFER => 1,