Version Description
Added a feature where one can decide to only add the country feed shipping costs or all countries
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 7.8.0 |
Comparing to | |
See all releases |
Code changes from version 7.7.9 to 7.8.0
- classes/class-get-products.php +4 -5
- js/woosea_key.js +1 -1
- js/woosea_manage.js +20 -0
- pages/admin/woosea-manage-settings.php +18 -1
- readme.txt +7 -1
- woocommerce-sea.php +23 -3
classes/class-get-products.php
CHANGED
@@ -654,13 +654,13 @@ class WooSEA_Get_Products {
|
|
654 |
$base_location = wc_get_base_location();
|
655 |
$base_country = $base_location['country'];
|
656 |
$from_currency = get_woocommerce_currency();
|
|
|
|
|
657 |
|
658 |
// Normal shipping set-up
|
659 |
$zone_count = count($shipping_arr)+1;
|
660 |
|
661 |
foreach ( $shipping_zones as $zone){
|
662 |
-
// $zone['zone_name'] = str_replace("&", "&", $zone['zone_name']);
|
663 |
-
|
664 |
// Start with a clean shipping zone
|
665 |
$zone_details = array();
|
666 |
$zone_details['country'] = "";
|
@@ -673,9 +673,8 @@ class WooSEA_Get_Products {
|
|
673 |
|
674 |
// Only add shipping zones to the feed for specific feed country
|
675 |
$ship_found = strpos($zone_type->code, $code_from_config);
|
676 |
-
|
677 |
-
if($ship_found !== false){
|
678 |
-
//if($code_from_config == $zone_type->code){
|
679 |
if ($zone_type->type == "country"){
|
680 |
// This is a country shipping zone
|
681 |
$zone_details['country'] = $zone_type->code;
|
654 |
$base_location = wc_get_base_location();
|
655 |
$base_country = $base_location['country'];
|
656 |
$from_currency = get_woocommerce_currency();
|
657 |
+
$add_all_shipping = "no";
|
658 |
+
$add_all_shipping = get_option ('add_all_shipping');
|
659 |
|
660 |
// Normal shipping set-up
|
661 |
$zone_count = count($shipping_arr)+1;
|
662 |
|
663 |
foreach ( $shipping_zones as $zone){
|
|
|
|
|
664 |
// Start with a clean shipping zone
|
665 |
$zone_details = array();
|
666 |
$zone_details['country'] = "";
|
673 |
|
674 |
// Only add shipping zones to the feed for specific feed country
|
675 |
$ship_found = strpos($zone_type->code, $code_from_config);
|
676 |
+
|
677 |
+
if(($ship_found !== false) OR ($add_all_shipping == "yes")){
|
|
|
678 |
if ($zone_type->type == "country"){
|
679 |
// This is a country shipping zone
|
680 |
$zone_details['country'] = $zone_type->code;
|
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.
|
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.0',
|
31 |
jsonp: 'callback',
|
32 |
dataType: 'jsonp',
|
33 |
type: 'GET',
|
js/woosea_manage.js
CHANGED
@@ -201,6 +201,26 @@ jQuery(document).ready(function($) {
|
|
201 |
}
|
202 |
})
|
203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
// Check if user would like to enable debug logging
|
205 |
$('#add_woosea_logging').on('change', function(){ // on change of state
|
206 |
if(this.checked){
|
201 |
}
|
202 |
})
|
203 |
|
204 |
+
// Check if user would like to add all country shipping costs
|
205 |
+
$('#add_all_shipping').on('change', function(){ // on change of state
|
206 |
+
if(this.checked){
|
207 |
+
|
208 |
+
// Checkbox is on
|
209 |
+
jQuery.ajax({
|
210 |
+
method: "POST",
|
211 |
+
url: ajaxurl,
|
212 |
+
data: { 'action': 'woosea_add_all_shipping', 'status': "on" }
|
213 |
+
})
|
214 |
+
} else {
|
215 |
+
// Checkbox is off
|
216 |
+
jQuery.ajax({
|
217 |
+
method: "POST",
|
218 |
+
url: ajaxurl,
|
219 |
+
data: { 'action': 'woosea_add_all_shipping', 'status': "off" }
|
220 |
+
})
|
221 |
+
}
|
222 |
+
})
|
223 |
+
|
224 |
// Check if user would like to enable debug logging
|
225 |
$('#add_woosea_logging').on('change', function(){ // on change of state
|
226 |
if(this.checked){
|
pages/admin/woosea-manage-settings.php
CHANGED
@@ -273,7 +273,24 @@ if(isset($_GET["tab"])) {
|
|
273 |
</label>
|
274 |
</td>
|
275 |
</tr>
|
276 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
277 |
<tr>
|
278 |
<td>
|
279 |
<span><?php _e( 'Enable logging (Enable only on advice of our support-team):', 'woo-product-feed-pro');?></span>
|
273 |
</label>
|
274 |
</td>
|
275 |
</tr>
|
276 |
+
<tr>
|
277 |
+
<td>
|
278 |
+
<span><?php _e( 'Add shipping costs for all countries (Google Shopping / Facebook)', 'woo-product-feed-pro');?></span>
|
279 |
+
</td>
|
280 |
+
<td>
|
281 |
+
<label class="woo-product-feed-pro-switch">
|
282 |
+
<?php
|
283 |
+
$add_all_shipping = get_option ('add_all_shipping');
|
284 |
+
if($add_all_shipping == "yes"){
|
285 |
+
print "<input type=\"checkbox\" id=\"add_all_shipping\" name=\"add_all_shipping\" class=\"checkbox-field\" checked>";
|
286 |
+
} else {
|
287 |
+
print "<input type=\"checkbox\" id=\"add_all_shipping\" name=\"add_all_shipping\" class=\"checkbox-field\">";
|
288 |
+
}
|
289 |
+
?>
|
290 |
+
<div class="woo-product-feed-pro-slider round"></div>
|
291 |
+
</label>
|
292 |
+
</td>
|
293 |
+
</tr>
|
294 |
<tr>
|
295 |
<td>
|
296 |
<span><?php _e( 'Enable logging (Enable only on advice of our support-team):', '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.3
|
8 |
-
Stable tag: 7.
|
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.7.9 (2020-03-25) =
|
316 |
* Only shipping costs are added to the feed for the country the feed was configured
|
317 |
|
@@ -2480,6 +2483,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
2480 |
|
2481 |
== Upgrade Notice ==
|
2482 |
|
|
|
|
|
|
|
2483 |
= 7.7.9 =
|
2484 |
Only shipping costs are added to the feed for the country the feed was configured
|
2485 |
|
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.8.0
|
9 |
|
10 |
== Description ==
|
11 |
|
312 |
|
313 |
=== Changelog ===
|
314 |
|
315 |
+
= 7.8.0 (2020-03-25) =
|
316 |
+
* Added a feature where one can decide to only add the country feed shipping costs or all countries
|
317 |
+
|
318 |
= 7.7.9 (2020-03-25) =
|
319 |
* Only shipping costs are added to the feed for the country the feed was configured
|
320 |
|
2483 |
|
2484 |
== Upgrade Notice ==
|
2485 |
|
2486 |
+
= 7.8.0 =
|
2487 |
+
Added a feature where one can decide to only add the country feed shipping costs or all countries
|
2488 |
+
|
2489 |
= 7.7.9 =
|
2490 |
Only shipping costs are added to the feed for the country the feed was configured
|
2491 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 7.
|
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.
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
@@ -2337,6 +2337,26 @@ function woosea_add_mother_image (){
|
|
2337 |
}
|
2338 |
add_action( 'wp_ajax_woosea_add_mother_image', 'woosea_add_mother_image' );
|
2339 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2340 |
/**
|
2341 |
* This function enables the setting to use
|
2342 |
* logging
|
@@ -4219,7 +4239,7 @@ function woosea_license_valid(){
|
|
4219 |
|
4220 |
if(!empty($license_information['license_key'])){
|
4221 |
$curl = curl_init();
|
4222 |
-
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.
|
4223 |
|
4224 |
curl_setopt_array($curl, array(
|
4225 |
CURLOPT_RETURNTRANSFER => 1,
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 7.8.0
|
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.0' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
2337 |
}
|
2338 |
add_action( 'wp_ajax_woosea_add_mother_image', 'woosea_add_mother_image' );
|
2339 |
|
2340 |
+
/**
|
2341 |
+
* This function enables the setting to use
|
2342 |
+
* Shipping costs for all countries
|
2343 |
+
*/
|
2344 |
+
function woosea_add_all_shipping (){
|
2345 |
+
$status = sanitize_text_field($_POST['status']);
|
2346 |
+
|
2347 |
+
if ($status == "off"){
|
2348 |
+
update_option( 'add_all_shipping', 'no', 'yes');
|
2349 |
+
} else {
|
2350 |
+
update_option( 'add_all_shipping', 'yes', 'yes');
|
2351 |
+
}
|
2352 |
+
}
|
2353 |
+
add_action( 'wp_ajax_woosea_add_all_shipping', 'woosea_add_all_shipping' );
|
2354 |
+
|
2355 |
+
|
2356 |
+
|
2357 |
+
|
2358 |
+
|
2359 |
+
|
2360 |
/**
|
2361 |
* This function enables the setting to use
|
2362 |
* logging
|
4239 |
|
4240 |
if(!empty($license_information['license_key'])){
|
4241 |
$curl = curl_init();
|
4242 |
+
$url = "https://www.adtribes.io/check/license.php?key=$license_information[license_key]&email=$license_information[license_email]&domain=$domain&version=7.8.0";
|
4243 |
|
4244 |
curl_setopt_array($curl, array(
|
4245 |
CURLOPT_RETURNTRANSFER => 1,
|