Version Description
Added a feature to add the parent product ID to the Facebook pixel ID instead of the variation product ID's for variable products
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 8.3.3 |
Comparing to | |
See all releases |
Code changes from version 8.3.2 to 8.3.3
- js/woosea_manage.js +12 -0
- pages/admin/woosea-manage-settings.php +23 -0
- readme.txt +7 -1
- woocommerce-sea.php +29 -8
js/woosea_manage.js
CHANGED
@@ -272,6 +272,18 @@ jQuery(document).ready(function($) {
|
|
272 |
}
|
273 |
})
|
274 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
275 |
// Check if user would like to add a Facebook Pixel to their website
|
276 |
$('#add_facebook_pixel').on('change', function(){ // on change of state
|
277 |
if(this.checked){
|
272 |
}
|
273 |
})
|
274 |
|
275 |
+
// Check if user would like to add a Facebook Pixel to their website
|
276 |
+
$('#woosea_content_ids').on('change', function(){ // on change of state
|
277 |
+
var content_ids = $('#woosea_content_ids').val();
|
278 |
+
if(content_ids){
|
279 |
+
jQuery.ajax({
|
280 |
+
method: "POST",
|
281 |
+
url: ajaxurl,
|
282 |
+
data: { 'action': 'woosea_facebook_content_ids', 'content_ids': content_ids }
|
283 |
+
})
|
284 |
+
}
|
285 |
+
})
|
286 |
+
|
287 |
// Check if user would like to add a Facebook Pixel to their website
|
288 |
$('#add_facebook_pixel').on('change', function(){ // on change of state
|
289 |
if(this.checked){
|
pages/admin/woosea-manage-settings.php
CHANGED
@@ -356,6 +356,29 @@ if(isset($_GET["tab"])) {
|
|
356 |
}
|
357 |
?>
|
358 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
<tr id="remarketing">
|
360 |
<td>
|
361 |
<span><?php _e( 'Add Google Dynamic Remarketing Pixel:', 'woo-product-feed-pro');?></span>
|
356 |
}
|
357 |
?>
|
358 |
|
359 |
+
<?php
|
360 |
+
$content_ids = "variation";
|
361 |
+
$content_ids = get_option( 'add_facebook_pixel_content_ids' );
|
362 |
+
?>
|
363 |
+
|
364 |
+
<tr id="content_ids">
|
365 |
+
<td colspan="2">
|
366 |
+
<span><?php _e( 'Content IDS variable products Facebook Pixel:', 'woo-product-feed-pro');?></span>
|
367 |
+
<select id="woosea_content_ids" name="woosea_content_ids" class="select-field">
|
368 |
+
<?php
|
369 |
+
if($content_ids == "variation"){
|
370 |
+
print "<option value=\"variation\" selected>Variation product ID's</option>";
|
371 |
+
print "<option value=\"variable\">Variable product ID</option>";
|
372 |
+
} else {
|
373 |
+
print "<option value=\"variation\" selected>Variation product ID's</option>";
|
374 |
+
print "<option value=\"variable\" selected>Variable product ID</option>";
|
375 |
+
}
|
376 |
+
?>
|
377 |
+
</select>
|
378 |
+
</td>
|
379 |
+
</tr>
|
380 |
+
|
381 |
+
|
382 |
<tr id="remarketing">
|
383 |
<td>
|
384 |
<span><?php _e( 'Add Google Dynamic Remarketing Pixel:', 'woo-product-feed-pro');?></span>
|
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: 8.3.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -313,6 +313,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
313 |
|
314 |
=== Changelog ===
|
315 |
|
|
|
|
|
|
|
316 |
= 8.3.2 (2020-06-09) =
|
317 |
* Solved a PHP notification on the settings page for users running an older PHP version
|
318 |
|
@@ -2648,6 +2651,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
2648 |
|
2649 |
== Upgrade Notice ==
|
2650 |
|
|
|
|
|
|
|
2651 |
= 8.3.2 =
|
2652 |
Solved a PHP notification on the settings page for users running an older PHP version
|
2653 |
|
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: 8.3.3
|
9 |
|
10 |
== Description ==
|
11 |
|
313 |
|
314 |
=== Changelog ===
|
315 |
|
316 |
+
= 8.3.3 (2020-06-10) =
|
317 |
+
* Added a feature to add the parent product ID to the Facebook pixel ID instead of the variation product ID's for variable products
|
318 |
+
|
319 |
= 8.3.2 (2020-06-09) =
|
320 |
* Solved a PHP notification on the settings page for users running an older PHP version
|
321 |
|
2651 |
|
2652 |
== Upgrade Notice ==
|
2653 |
|
2654 |
+
= 8.3.3 =
|
2655 |
+
Added a feature to add the parent product ID to the Facebook pixel ID instead of the variation product ID's for variable products
|
2656 |
+
|
2657 |
= 8.3.2 =
|
2658 |
Solved a PHP notification on the settings page for users running an older PHP version
|
2659 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 8.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', '8.3.
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
@@ -410,12 +410,19 @@ function woosea_add_facebook_pixel( $product = null ){
|
|
410 |
// This is a parent variable product
|
411 |
// Since these are not allowed in the feed, at the variations product ID's
|
412 |
// Get children product variation IDs in an array
|
413 |
-
$
|
414 |
-
$
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
419 |
|
420 |
$content = rtrim($content, ",");
|
421 |
$prices = $product->get_variation_prices();
|
@@ -2329,6 +2336,20 @@ function woosea_add_facebook_pixel_setting (){
|
|
2329 |
}
|
2330 |
add_action( 'wp_ajax_woosea_add_facebook_pixel_setting', 'woosea_add_facebook_pixel_setting' );
|
2331 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2332 |
/**
|
2333 |
* This function enables the setting to add
|
2334 |
* Google's Dynamic Remarketing
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 8.3.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 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
+
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '8.3.3' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
410 |
// This is a parent variable product
|
411 |
// Since these are not allowed in the feed, at the variations product ID's
|
412 |
// Get children product variation IDs in an array
|
413 |
+
$woosea_content_ids = "variation";
|
414 |
+
$woosea_content_ids = get_option( 'add_facebook_pixel_content_ids' );
|
415 |
+
|
416 |
+
if($woosea_content_ids == "variation"){
|
417 |
+
$children_ids = $product->get_children();
|
418 |
+
$content = "";
|
419 |
+
foreach ($children_ids as $id){
|
420 |
+
$content .= '\''.$id.'\',';
|
421 |
+
//$content .= $id.',';
|
422 |
+
}
|
423 |
+
} else {
|
424 |
+
$content = '\''.$fb_prodid.'\'';
|
425 |
+
}
|
426 |
|
427 |
$content = rtrim($content, ",");
|
428 |
$prices = $product->get_variation_prices();
|
2336 |
}
|
2337 |
add_action( 'wp_ajax_woosea_add_facebook_pixel_setting', 'woosea_add_facebook_pixel_setting' );
|
2338 |
|
2339 |
+
/**
|
2340 |
+
* This function saves the value that needs to be used in the Facebook pixel content_ids parameter
|
2341 |
+
*/
|
2342 |
+
function woosea_facebook_content_ids (){
|
2343 |
+
$content_ids = sanitize_text_field($_POST['content_ids']);
|
2344 |
+
|
2345 |
+
if ($content_ids == "variable"){
|
2346 |
+
update_option( 'add_facebook_pixel_content_ids', 'variable', 'yes');
|
2347 |
+
} else {
|
2348 |
+
update_option( 'add_facebook_pixel_content_ids', 'variation', 'yes');
|
2349 |
+
}
|
2350 |
+
}
|
2351 |
+
add_action( 'wp_ajax_woosea_facebook_content_ids', 'woosea_facebook_content_ids' );
|
2352 |
+
|
2353 |
/**
|
2354 |
* This function enables the setting to add
|
2355 |
* Google's Dynamic Remarketing
|