Version Description
- Added a fail-safe when users do not select a marketing channel which let to PHP notices in logs
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 9.5.9 |
Comparing to | |
See all releases |
Code changes from version 9.3.7 to 9.5.9
- TODO.txt +0 -2
- classes/channels/class-google_shopping.php +5 -0
- classes/class-activate.php +7 -0
- classes/class-attributes.php +15 -8
- classes/class-get-products.php +94 -45
- js/woosea_key.js +1 -1
- js/woosea_manage.js +20 -0
- pages/admin/woosea-manage-feed.php +13 -0
- pages/admin/woosea-manage-settings.php +41 -5
- readme.txt +141 -2
- woocommerce-sea.php +35 -9
TODO.txt
CHANGED
@@ -12,11 +12,9 @@ Priority issues:
|
|
12 |
- Add support for Multisites
|
13 |
- Add a filter on review score (and amount of reviews)
|
14 |
- Make extra woosea fields available for front-end usage
|
15 |
-
- Only update feed when changes to products have been made
|
16 |
- Add header to extra fields on product edit pages
|
17 |
- Add possibility to create OR rules
|
18 |
- Add support for Google My Business product feeds
|
19 |
-
- Build a better WP Cron check, current one is not good enough
|
20 |
- AMAZON integration:
|
21 |
- requires a professional seller account, 39 dollar a month, before being able to create a developer account
|
22 |
- only than we can use their MWS service needed to connect our plugin
|
12 |
- Add support for Multisites
|
13 |
- Add a filter on review score (and amount of reviews)
|
14 |
- Make extra woosea fields available for front-end usage
|
|
|
15 |
- Add header to extra fields on product edit pages
|
16 |
- Add possibility to create OR rules
|
17 |
- Add support for Google My Business product feeds
|
|
|
18 |
- AMAZON integration:
|
19 |
- requires a professional seller account, 39 dollar a month, before being able to create a developer account
|
20 |
- only than we can use their MWS service needed to connect our plugin
|
classes/channels/class-google_shopping.php
CHANGED
@@ -356,6 +356,11 @@ class WooSEA_google_shopping {
|
|
356 |
"feed_name" => "g:max_handling_time",
|
357 |
"format" => "optional",
|
358 |
),
|
|
|
|
|
|
|
|
|
|
|
359 |
),
|
360 |
"Tax" => array(
|
361 |
"Tax" => array(
|
356 |
"feed_name" => "g:max_handling_time",
|
357 |
"format" => "optional",
|
358 |
),
|
359 |
+
"Ships from country" => array(
|
360 |
+
"name" => "ships_from_country",
|
361 |
+
"feed_name" => "g:ships_from_country",
|
362 |
+
"format" => "optional",
|
363 |
+
),
|
364 |
),
|
365 |
"Tax" => array(
|
366 |
"Tax" => array(
|
classes/class-activate.php
CHANGED
@@ -1112,6 +1112,13 @@ class WooSEA_Activation {
|
|
1112 |
"taxonomy" => "none",
|
1113 |
"utm_source" => "Tweakers.nl",
|
1114 |
"type" => "Comparison shopping engine" ),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1115 |
"Fashionchick.nl" => array (
|
1116 |
"channel_hash" => md5("Fashionchick.nl"),
|
1117 |
"name" => "Fashionchick.nl",
|
1112 |
"taxonomy" => "none",
|
1113 |
"utm_source" => "Tweakers.nl",
|
1114 |
"type" => "Comparison shopping engine" ),
|
1115 |
+
"Boetiek.nl" => array (
|
1116 |
+
"channel_hash" => md5("Boetiek.nl"),
|
1117 |
+
"name" => "Boetiek.nl",
|
1118 |
+
"fields" => "boetiek",
|
1119 |
+
"taxonomy" => "none",
|
1120 |
+
"utm_source" => "Boetiek.nl",
|
1121 |
+
"type" => "Comparison shopping engine" ),
|
1122 |
"Fashionchick.nl" => array (
|
1123 |
"channel_hash" => md5("Fashionchick.nl"),
|
1124 |
"name" => "Fashionchick.nl",
|
classes/class-attributes.php
CHANGED
@@ -48,7 +48,7 @@ private function get_dynamic_attributes(){
|
|
48 |
global $wpdb;
|
49 |
$list = array();
|
50 |
|
51 |
-
$no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","
|
52 |
$taxonomies = get_taxonomies();
|
53 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
54 |
|
@@ -212,6 +212,8 @@ public function get_mapping_attributes_dropdown() {
|
|
212 |
"short_description" => "Product short description",
|
213 |
"raw_description" => "Unfiltered product description",
|
214 |
"raw_short_description" => "Unfiltered product short description",
|
|
|
|
|
215 |
"price" => "Price",
|
216 |
"regular_price" => "Regular price",
|
217 |
"sale_price" => "Sale price",
|
@@ -247,7 +249,7 @@ public function get_mapping_attributes_dropdown() {
|
|
247 |
"category_path" => "Category path",
|
248 |
"category_path_short" => "Category path short",
|
249 |
"category_path_skroutz" => "Category path Skroutz",
|
250 |
-
"one_category" => "
|
251 |
"condition" => "Condition",
|
252 |
"availability" => "Availability",
|
253 |
"quantity" => "Quantity [Stock]",
|
@@ -267,7 +269,8 @@ public function get_mapping_attributes_dropdown() {
|
|
267 |
"length" => "Length",
|
268 |
"shipping" => "Shipping",
|
269 |
"shipping_price" => "Shipping cost",
|
270 |
-
"shipping_label" => "Shipping
|
|
|
271 |
"visibility" => "Visibility",
|
272 |
"rating_total" => "Total rating",
|
273 |
"rating_average" => "Average rating",
|
@@ -350,9 +353,10 @@ public function get_mapping_attributes_dropdown() {
|
|
350 |
|
351 |
foreach ($custom_attributes as $key => $value) {
|
352 |
if (!preg_match("/pyre|sbg|fusion/i",$value)){
|
353 |
-
|
|
|
354 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
355 |
-
|
356 |
}
|
357 |
}
|
358 |
|
@@ -406,7 +410,9 @@ public function get_mapping_attributes_dropdown() {
|
|
406 |
"short_description" => "Product short description",
|
407 |
"raw_description" => "Unfiltered product description",
|
408 |
"raw_short_description" => "Unfiltered product short description",
|
409 |
-
|
|
|
|
|
410 |
"variable_link" => "Product variable link",
|
411 |
"add_to_cart_link" => "Add to cart link",
|
412 |
"image" => "Main image",
|
@@ -429,7 +435,7 @@ public function get_mapping_attributes_dropdown() {
|
|
429 |
"category_path" => "Category path",
|
430 |
"category_path_short" => "Category path short",
|
431 |
"category_path_skroutz" => "Category path Skroutz",
|
432 |
-
"one_category" => "
|
433 |
"condition" => "Condition",
|
434 |
"availability" => "Availability",
|
435 |
"quantity" => "Quantity [Stock]",
|
@@ -464,7 +470,8 @@ public function get_mapping_attributes_dropdown() {
|
|
464 |
"length" => "Length",
|
465 |
"shipping" => "Shipping",
|
466 |
"shipping_price" => "Shipping cost",
|
467 |
-
|
|
|
468 |
"visibility" => "Visibility",
|
469 |
"rating_total" => "Total rating",
|
470 |
"rating_average" => "Average rating",
|
48 |
global $wpdb;
|
49 |
$list = array();
|
50 |
|
51 |
+
$no_taxonomies = array("portfolio_category","portfolio_skills","portfolio_tags","nav_menu","post_format","slide-page","element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
|
52 |
$taxonomies = get_taxonomies();
|
53 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
54 |
|
212 |
"short_description" => "Product short description",
|
213 |
"raw_description" => "Unfiltered product description",
|
214 |
"raw_short_description" => "Unfiltered product short description",
|
215 |
+
"mother_description" => "Product description parent product",
|
216 |
+
"mother_short_description" => "Product short description parent product",
|
217 |
"price" => "Price",
|
218 |
"regular_price" => "Regular price",
|
219 |
"sale_price" => "Sale price",
|
249 |
"category_path" => "Category path",
|
250 |
"category_path_short" => "Category path short",
|
251 |
"category_path_skroutz" => "Category path Skroutz",
|
252 |
+
"one_category" => "Yoast primary category",
|
253 |
"condition" => "Condition",
|
254 |
"availability" => "Availability",
|
255 |
"quantity" => "Quantity [Stock]",
|
269 |
"length" => "Length",
|
270 |
"shipping" => "Shipping",
|
271 |
"shipping_price" => "Shipping cost",
|
272 |
+
"shipping_label" => "Shipping class slug",
|
273 |
+
"shipping_label_name" => "Shipping class name",
|
274 |
"visibility" => "Visibility",
|
275 |
"rating_total" => "Total rating",
|
276 |
"rating_average" => "Average rating",
|
353 |
|
354 |
foreach ($custom_attributes as $key => $value) {
|
355 |
if (!preg_match("/pyre|sbg|fusion/i",$value)){
|
356 |
+
$value = ltrim($value);
|
357 |
+
if (!empty($value)){
|
358 |
$dropdown .= "<option value='$key'>" . ucfirst($value) . "</option>";
|
359 |
+
}
|
360 |
}
|
361 |
}
|
362 |
|
410 |
"short_description" => "Product short description",
|
411 |
"raw_description" => "Unfiltered product description",
|
412 |
"raw_short_description" => "Unfiltered product short description",
|
413 |
+
"mother_description" => "Product description parent product",
|
414 |
+
"mother_short_description" => "Product short description parent product",
|
415 |
+
"link" => "Link",
|
416 |
"variable_link" => "Product variable link",
|
417 |
"add_to_cart_link" => "Add to cart link",
|
418 |
"image" => "Main image",
|
435 |
"category_path" => "Category path",
|
436 |
"category_path_short" => "Category path short",
|
437 |
"category_path_skroutz" => "Category path Skroutz",
|
438 |
+
"one_category" => "Yoast primary category",
|
439 |
"condition" => "Condition",
|
440 |
"availability" => "Availability",
|
441 |
"quantity" => "Quantity [Stock]",
|
470 |
"length" => "Length",
|
471 |
"shipping" => "Shipping",
|
472 |
"shipping_price" => "Shipping cost",
|
473 |
+
"shipping_label" => "Shipping class slug",
|
474 |
+
"shipping_label_name" => "Shipping class name",
|
475 |
"visibility" => "Visibility",
|
476 |
"rating_total" => "Total rating",
|
477 |
"rating_average" => "Average rating",
|
classes/class-get-products.php
CHANGED
@@ -26,7 +26,6 @@ class WooSEA_Get_Products {
|
|
26 |
return "<![CDATA[ $string ]]>";
|
27 |
}
|
28 |
|
29 |
-
|
30 |
/**
|
31 |
* Check if a plugin is active
|
32 |
*/
|
@@ -57,6 +56,11 @@ class WooSEA_Get_Products {
|
|
57 |
* Get all approved product review comments for Google's Product Review Feeds
|
58 |
*/
|
59 |
public function woosea_get_reviews ( $product_data, $product ) {
|
|
|
|
|
|
|
|
|
|
|
60 |
$approved_reviews = array();
|
61 |
$prod_id = $product_data['id'];
|
62 |
|
@@ -84,8 +88,10 @@ class WooSEA_Get_Products {
|
|
84 |
$cnt = 0;
|
85 |
$name = "";
|
86 |
foreach($name_pieces as $n_piece){
|
|
|
|
|
87 |
if($cnt > 0){
|
88 |
-
$n_piece = substr($n_piece, 0, 1);
|
89 |
}
|
90 |
$name .= $n_piece." ";
|
91 |
$cnt++;
|
@@ -96,7 +102,7 @@ class WooSEA_Get_Products {
|
|
96 |
$review['reviewer_name'] = html_entity_decode((str_replace("\r", "", $review['reviewer_name'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
97 |
$review['reviewer_name'] = preg_replace( '/\[(.*?)\]/', ' ', $review['reviewer_name'] );
|
98 |
$review['reviewer_name'] = str_replace(" ", "", $review['reviewer_name']);
|
99 |
-
|
100 |
|
101 |
$review['reviewer_id'] = $review_raw->user_id;
|
102 |
$review['review_timestamp'] = $review_raw->comment_date;
|
@@ -931,6 +937,16 @@ class WooSEA_Get_Products {
|
|
931 |
unset($shipping_cost);
|
932 |
}
|
933 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
934 |
}
|
935 |
|
936 |
if(isset($zone_details)){
|
@@ -957,12 +973,9 @@ class WooSEA_Get_Products {
|
|
957 |
$zone_details['price'] = trim($shipping_cost);
|
958 |
}
|
959 |
} else {
|
960 |
-
// $shipping_cost = 0;
|
961 |
if(isset($shipping_cost)){
|
962 |
$zone_details['price'] = trim($currency." ".$shipping_cost);
|
963 |
}
|
964 |
-
//unset($zone_details);
|
965 |
-
//unset($shipping_cost);
|
966 |
}
|
967 |
}
|
968 |
}
|
@@ -992,12 +1005,19 @@ class WooSEA_Get_Products {
|
|
992 |
|
993 |
// Remove other shipping classes when free shipping is relevant
|
994 |
$free_check = "yes";
|
995 |
-
//$free_check = get_option ('free_shipping');
|
996 |
|
997 |
if(in_array($free_check, array_column($shipping_arr, 'free'))) { // search value in the array
|
998 |
foreach($shipping_arr as $k => $v) {
|
999 |
if(!in_array($free_check, $v)){
|
1000 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1001 |
}
|
1002 |
}
|
1003 |
}
|
@@ -1005,8 +1025,6 @@ class WooSEA_Get_Products {
|
|
1005 |
// Fix empty services
|
1006 |
foreach($shipping_arr as $k => $v){
|
1007 |
if(empty($v['service'])){
|
1008 |
-
// $lalala = get_option( 'woocommerce_default_country' );
|
1009 |
-
// $shipping_arr[$k]['country'] = get_option( 'woocommerce_default_country' );
|
1010 |
unset($shipping_arr[$k]);
|
1011 |
}
|
1012 |
}
|
@@ -1145,16 +1163,19 @@ class WooSEA_Get_Products {
|
|
1145 |
} elseif (preg_match("/g:product_detail/i",$k)){
|
1146 |
if(!empty($v)){
|
1147 |
$product_detail_split = explode("#", $v);
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
|
|
|
|
|
|
1158 |
}
|
1159 |
} elseif ($k == "g:installment"){
|
1160 |
if(!empty($v)){
|
@@ -1993,7 +2014,7 @@ class WooSEA_Get_Products {
|
|
1993 |
$xml_piece = "";
|
1994 |
|
1995 |
// Get taxonomies
|
1996 |
-
$no_taxonomies = array("element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","
|
1997 |
$taxonomies = get_taxonomies();
|
1998 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
1999 |
|
@@ -2325,6 +2346,10 @@ class WooSEA_Get_Products {
|
|
2325 |
$product_data['raw_description'] = substr($product_data['raw_description'], 0, 5000);
|
2326 |
$product_data['raw_short_description'] = substr($product_data['raw_short_description'], 0, 5000);
|
2327 |
|
|
|
|
|
|
|
|
|
2328 |
/**
|
2329 |
* Check of we need to add Google Analytics UTM parameters
|
2330 |
*/
|
@@ -2439,6 +2464,10 @@ class WooSEA_Get_Products {
|
|
2439 |
}
|
2440 |
|
2441 |
$product_data['shipping_label'] = $product->get_shipping_class();
|
|
|
|
|
|
|
|
|
2442 |
|
2443 |
// Get product prices
|
2444 |
$product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
|
@@ -2485,6 +2514,7 @@ class WooSEA_Get_Products {
|
|
2485 |
if($product->get_type() == "bundle"){
|
2486 |
if ($this->woosea_is_plugin_active('woocommerce-product-bundles/woocommerce-product-bundles.php')){
|
2487 |
$product_data['price'] = get_post_meta($product_data['id'], '_price', true);
|
|
|
2488 |
if(is_numeric($tax_rates[1]['rate'])){
|
2489 |
$product_data['price_forced'] = round(get_post_meta($product_data['id'], '_price', true) * (100+$tax_rates[1]['rate'])/100,2);
|
2490 |
$product_data['regular_price'] = round(get_post_meta($product_data['id'], '_regular_price', true) * (100+$tax_rates[1]['rate'])/100,2);
|
@@ -2582,6 +2612,7 @@ class WooSEA_Get_Products {
|
|
2582 |
$discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
|
2583 |
if($discount !== false){
|
2584 |
$product_data['sale_price'] = $discount;
|
|
|
2585 |
$price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
|
2586 |
if($price_incl_tax == "yes"){
|
2587 |
$product_data['price_forced'] = $product_data['price']*($fullrate/100);
|
@@ -2742,7 +2773,7 @@ class WooSEA_Get_Products {
|
|
2742 |
}
|
2743 |
}
|
2744 |
|
2745 |
-
if ((array_key_exists('shipping', $project_config['attributes'])) OR (array_key_exists('shipping_price', $project_config['attributes'])) OR ($project_config['fields'] == "trovaprezzi")){
|
2746 |
$product_data['shipping'] = $this->woosea_get_shipping_cost($class_cost_id, $project_config, $product_data['price'], $tax_rates, $shipping_zones, $product_data['id'], $product_data['item_group_id']);
|
2747 |
$shipping_str = $product_data['shipping'];
|
2748 |
}
|
@@ -2848,7 +2879,7 @@ class WooSEA_Get_Products {
|
|
2848 |
$variations = $product_skroutz->get_available_variations();
|
2849 |
$variations_id = wp_list_pluck( $variations, 'variation_id' );
|
2850 |
$skroutz_att_array = array();
|
2851 |
-
|
2852 |
foreach($variations_id as $var_id){
|
2853 |
$stock_value = get_post_meta( $var_id, "_stock_status", true );
|
2854 |
if($stock_value == "instock"){
|
@@ -2977,7 +3008,7 @@ class WooSEA_Get_Products {
|
|
2977 |
$data = $wpdb->get_results($sql);
|
2978 |
if (count($data)) {
|
2979 |
foreach ($data as $key => $value) {
|
2980 |
-
|
2981 |
if (preg_match("/_product_attributes/i",$value->name)){
|
2982 |
$product_attr = unserialize($value->type);
|
2983 |
if(!empty($product_attr)){
|
@@ -2995,14 +3026,14 @@ class WooSEA_Get_Products {
|
|
2995 |
|
2996 |
/**
|
2997 |
* Get Product Attributes for Single products
|
|
|
2998 |
*/
|
2999 |
-
if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('mix-and-match')) OR ($product->is_type('bundle')) OR ($product->is_type('composite')) OR ($product->is_type('auction') OR ($product->is_type('subscription')))){
|
3000 |
$single_attributes = $product->get_attributes();
|
3001 |
-
|
3002 |
foreach ($single_attributes as $attribute){
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
}
|
3007 |
}
|
3008 |
|
@@ -3028,9 +3059,9 @@ class WooSEA_Get_Products {
|
|
3028 |
$product_variations = new WC_Product_Variation( $product_data['id'] );
|
3029 |
$variations = $product_variations->get_variation_attributes();
|
3030 |
|
3031 |
-
// For Skroutz apparal products we can only append colours to the product name
|
3032 |
// When a product has both a size and color attribute we assume its an apparal product
|
3033 |
-
if($project_config['fields'] == "skroutz"){
|
3034 |
$size_found = "no";
|
3035 |
$color_found = "no";
|
3036 |
|
@@ -3448,6 +3479,17 @@ class WooSEA_Get_Products {
|
|
3448 |
*/
|
3449 |
$product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
|
3450 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3451 |
/**
|
3452 |
* Check if individual products need to be excluded
|
3453 |
*/
|
@@ -3513,16 +3555,19 @@ class WooSEA_Get_Products {
|
|
3513 |
// For these channels parent products are allowed
|
3514 |
$allowed_channel_parents = array(
|
3515 |
"skroutz",
|
|
|
3516 |
"google_dsa",
|
3517 |
"google_product_review",
|
3518 |
);
|
3519 |
|
3520 |
-
if
|
3521 |
-
if(($
|
3522 |
-
$product_data
|
3523 |
-
|
3524 |
-
|
3525 |
-
|
|
|
|
|
3526 |
|
3527 |
/**
|
3528 |
* Remove variation products that are not THE default variation product
|
@@ -4926,7 +4971,6 @@ class WooSEA_Get_Products {
|
|
4926 |
|
4927 |
foreach ($product_data as $pd_key => $pd_value){
|
4928 |
// Check is there is a rule on specific attributes
|
4929 |
-
|
4930 |
if(in_array($pd_key, $pr_array, TRUE)){
|
4931 |
|
4932 |
if($pd_key == "price"){
|
@@ -5026,11 +5070,10 @@ class WooSEA_Get_Products {
|
|
5026 |
$in_tag_array = "yes";
|
5027 |
}
|
5028 |
}
|
5029 |
-
|
5030 |
if($in_tag_array == "yes"){
|
5031 |
//if(in_array($pr_array['criteria'], $pd_value, TRUE)) {
|
5032 |
$v = $pr_array['criteria'];
|
5033 |
-
|
5034 |
switch ($pr_array['condition']) {
|
5035 |
case($pr_array['condition'] = "contains"):
|
5036 |
if ((preg_match('/'.$pr_array['criteria'].'/', $v))){
|
@@ -5132,8 +5175,12 @@ class WooSEA_Get_Products {
|
|
5132 |
if($allowed <> 0){
|
5133 |
$allowed = 1;
|
5134 |
}
|
5135 |
-
} else {
|
5136 |
-
|
|
|
|
|
|
|
|
|
5137 |
}
|
5138 |
}
|
5139 |
break;
|
@@ -5316,7 +5363,7 @@ class WooSEA_Get_Products {
|
|
5316 |
}
|
5317 |
break;
|
5318 |
case($pr_array['condition'] = "="):
|
5319 |
-
if (($pr_array['criteria'] == "$pd_value")
|
5320 |
$allowed = 0;
|
5321 |
} elseif (($pr_array['criteria'] != "$pd_value") && ($pr_array['than'] == "include_only")){
|
5322 |
$found = strpos($pd_value,$pr_array['criteria']);
|
@@ -5346,10 +5393,12 @@ class WooSEA_Get_Products {
|
|
5346 |
$allowed = 1;
|
5347 |
}
|
5348 |
} elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "exclude")){
|
5349 |
-
$allowed = 0;
|
5350 |
} elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "include_only")){
|
5351 |
$allowed = 1;
|
5352 |
-
}
|
|
|
|
|
5353 |
break;
|
5354 |
case($pr_array['condition'] = "!="):
|
5355 |
if (($pr_array['criteria'] == "$pd_value") && ($pr_array['than'] == "exclude")){
|
26 |
return "<![CDATA[ $string ]]>";
|
27 |
}
|
28 |
|
|
|
29 |
/**
|
30 |
* Check if a plugin is active
|
31 |
*/
|
56 |
* Get all approved product review comments for Google's Product Review Feeds
|
57 |
*/
|
58 |
public function woosea_get_reviews ( $product_data, $product ) {
|
59 |
+
// Rwviews for the parent variable product itself can be skipped, the review is added for the variation
|
60 |
+
if($product_data['product_type'] == "variable"){
|
61 |
+
return;
|
62 |
+
}
|
63 |
+
|
64 |
$approved_reviews = array();
|
65 |
$prod_id = $product_data['id'];
|
66 |
|
88 |
$cnt = 0;
|
89 |
$name = "";
|
90 |
foreach($name_pieces as $n_piece){
|
91 |
+
$n_piece = str_replace("&", "", $n_piece);
|
92 |
+
|
93 |
if($cnt > 0){
|
94 |
+
$n_piece = ucfirst(substr($n_piece, 0, 1));
|
95 |
}
|
96 |
$name .= $n_piece." ";
|
97 |
$cnt++;
|
102 |
$review['reviewer_name'] = html_entity_decode((str_replace("\r", "", $review['reviewer_name'])), ENT_QUOTES | ENT_XML1, 'UTF-8');
|
103 |
$review['reviewer_name'] = preg_replace( '/\[(.*?)\]/', ' ', $review['reviewer_name'] );
|
104 |
$review['reviewer_name'] = str_replace(" ", "", $review['reviewer_name']);
|
105 |
+
$review['reviewer_name'] = $this->woosea_utf8_for_xml( $review['reviewer_name'] );
|
106 |
|
107 |
$review['reviewer_id'] = $review_raw->user_id;
|
108 |
$review['review_timestamp'] = $review_raw->comment_date;
|
937 |
unset($shipping_cost);
|
938 |
}
|
939 |
}
|
940 |
+
|
941 |
+
// User do not want to have free shipping in their feed
|
942 |
+
$remove_free_shipping = "no";
|
943 |
+
$remove_free_shipping = get_option ('remove_free_shipping');
|
944 |
+
|
945 |
+
if($remove_free_shipping == "yes"){
|
946 |
+
unset($zone_details['service']);
|
947 |
+
unset($zone_details['price']);
|
948 |
+
unset($shipping_cost);
|
949 |
+
}
|
950 |
}
|
951 |
|
952 |
if(isset($zone_details)){
|
973 |
$zone_details['price'] = trim($shipping_cost);
|
974 |
}
|
975 |
} else {
|
|
|
976 |
if(isset($shipping_cost)){
|
977 |
$zone_details['price'] = trim($currency." ".$shipping_cost);
|
978 |
}
|
|
|
|
|
979 |
}
|
980 |
}
|
981 |
}
|
1005 |
|
1006 |
// Remove other shipping classes when free shipping is relevant
|
1007 |
$free_check = "yes";
|
|
|
1008 |
|
1009 |
if(in_array($free_check, array_column($shipping_arr, 'free'))) { // search value in the array
|
1010 |
foreach($shipping_arr as $k => $v) {
|
1011 |
if(!in_array($free_check, $v)){
|
1012 |
+
|
1013 |
+
// User do not want to have free shipping in their feed
|
1014 |
+
// Only remove the other shipping classes when free shipping is not being removed
|
1015 |
+
$remove_free_shipping = "no";
|
1016 |
+
$remove_free_shipping = get_option ('remove_free_shipping');
|
1017 |
+
|
1018 |
+
if($remove_free_shipping == "no"){
|
1019 |
+
unset($shipping_arr[$k]);
|
1020 |
+
}
|
1021 |
}
|
1022 |
}
|
1023 |
}
|
1025 |
// Fix empty services
|
1026 |
foreach($shipping_arr as $k => $v){
|
1027 |
if(empty($v['service'])){
|
|
|
|
|
1028 |
unset($shipping_arr[$k]);
|
1029 |
}
|
1030 |
}
|
1163 |
} elseif (preg_match("/g:product_detail/i",$k)){
|
1164 |
if(!empty($v)){
|
1165 |
$product_detail_split = explode("#", $v);
|
1166 |
+
$detail_complete = count($product_detail_split);
|
1167 |
+
if($detail_complete == 2){
|
1168 |
+
$product_detail = $product->addChild('g:product_detail', '', $namespace['g']);
|
1169 |
+
$name = str_replace("_", " ", $product_detail_split[0]);
|
1170 |
+
|
1171 |
+
$section_name = explode(":", $name);
|
1172 |
+
$section_name_start = ucfirst($section_name[0]);
|
1173 |
+
$name = ucfirst(trim($section_name[1]));
|
1174 |
+
|
1175 |
+
$section_name = $product_detail->addChild('g:section_name', "General", $namespace['g']);
|
1176 |
+
$product_detail_name = $product_detail->addChild('g:attribute_name', $section_name_start, $namespace['g']);
|
1177 |
+
$product_detail_value = $product_detail->addChild('g:attribute_value', $product_detail_split[1], $namespace['g']);
|
1178 |
+
}
|
1179 |
}
|
1180 |
} elseif ($k == "g:installment"){
|
1181 |
if(!empty($v)){
|
2014 |
$xml_piece = "";
|
2015 |
|
2016 |
// Get taxonomies
|
2017 |
+
$no_taxonomies = array("element_category","template_category","portfolio_category","portfolio_skills","portfolio_tags","faq_category","slide-page","category","post_tag","nav_menu","link_category","post_format","product_type","product_visibility","product_cat","product_shipping_class","product_tag");
|
2018 |
$taxonomies = get_taxonomies();
|
2019 |
$diff_taxonomies = array_diff($taxonomies, $no_taxonomies);
|
2020 |
|
2346 |
$product_data['raw_description'] = substr($product_data['raw_description'], 0, 5000);
|
2347 |
$product_data['raw_short_description'] = substr($product_data['raw_short_description'], 0, 5000);
|
2348 |
|
2349 |
+
// Parent variable description
|
2350 |
+
$product_data['mother_description'] = $product_data['description'];
|
2351 |
+
$product_data['mother_short_description'] = $product_data['short_description'];
|
2352 |
+
|
2353 |
/**
|
2354 |
* Check of we need to add Google Analytics UTM parameters
|
2355 |
*/
|
2464 |
}
|
2465 |
|
2466 |
$product_data['shipping_label'] = $product->get_shipping_class();
|
2467 |
+
$term = get_term_by( 'slug', $product->get_shipping_class(), 'product_shipping_class' );
|
2468 |
+
if(is_object($term)){
|
2469 |
+
$product_data['shipping_label_name'] = $term->name;
|
2470 |
+
}
|
2471 |
|
2472 |
// Get product prices
|
2473 |
$product_data['price'] = wc_get_price_including_tax($product, array('price'=> $product->get_price()));
|
2514 |
if($product->get_type() == "bundle"){
|
2515 |
if ($this->woosea_is_plugin_active('woocommerce-product-bundles/woocommerce-product-bundles.php')){
|
2516 |
$product_data['price'] = get_post_meta($product_data['id'], '_price', true);
|
2517 |
+
$product_data['sale_price'] = get_post_meta($product_data['id'], '_sale_price', true);
|
2518 |
if(is_numeric($tax_rates[1]['rate'])){
|
2519 |
$product_data['price_forced'] = round(get_post_meta($product_data['id'], '_price', true) * (100+$tax_rates[1]['rate'])/100,2);
|
2520 |
$product_data['regular_price'] = round(get_post_meta($product_data['id'], '_regular_price', true) * (100+$tax_rates[1]['rate'])/100,2);
|
2612 |
$discount = apply_filters('advanced_woo_discount_rules_get_product_discount_price_from_custom_price', false, $product, 1, $product_data['sale_price'], 'discounted_price', true, true);
|
2613 |
if($discount !== false){
|
2614 |
$product_data['sale_price'] = $discount;
|
2615 |
+
$product_data['price'] = $discount;
|
2616 |
$price_incl_tax = get_option( 'woocommerce_prices_include_tax' );
|
2617 |
if($price_incl_tax == "yes"){
|
2618 |
$product_data['price_forced'] = $product_data['price']*($fullrate/100);
|
2773 |
}
|
2774 |
}
|
2775 |
|
2776 |
+
if ((array_key_exists('shipping', $project_config['attributes'])) OR (array_key_exists('shipping_price', $project_config['attributes'])) OR ($project_config['fields'] == "trovaprezzi") OR ($project_config['fields'] == "customfeed")){
|
2777 |
$product_data['shipping'] = $this->woosea_get_shipping_cost($class_cost_id, $project_config, $product_data['price'], $tax_rates, $shipping_zones, $product_data['id'], $product_data['item_group_id']);
|
2778 |
$shipping_str = $product_data['shipping'];
|
2779 |
}
|
2879 |
$variations = $product_skroutz->get_available_variations();
|
2880 |
$variations_id = wp_list_pluck( $variations, 'variation_id' );
|
2881 |
$skroutz_att_array = array();
|
2882 |
+
|
2883 |
foreach($variations_id as $var_id){
|
2884 |
$stock_value = get_post_meta( $var_id, "_stock_status", true );
|
2885 |
if($stock_value == "instock"){
|
3008 |
$data = $wpdb->get_results($sql);
|
3009 |
if (count($data)) {
|
3010 |
foreach ($data as $key => $value) {
|
3011 |
+
$value_display = str_replace("_", " ",$value->name);
|
3012 |
if (preg_match("/_product_attributes/i",$value->name)){
|
3013 |
$product_attr = unserialize($value->type);
|
3014 |
if(!empty($product_attr)){
|
3026 |
|
3027 |
/**
|
3028 |
* Get Product Attributes for Single products
|
3029 |
+
* These are the attributes users create themselves in WooCommerce
|
3030 |
*/
|
3031 |
+
if (($product->is_type('simple')) OR ($product->is_type('external')) OR ($product->is_type('mix-and-match')) OR ($product->is_type('bundle')) OR ($product->is_type('composite')) OR ($product->is_type('auction') OR ($product->is_type('subscription')) OR ($product->is_type('variable')))){
|
3032 |
$single_attributes = $product->get_attributes();
|
|
|
3033 |
foreach ($single_attributes as $attribute){
|
3034 |
+
$attr_name = strtolower($attribute->get_name());
|
3035 |
+
$attr_value = $product->get_attribute($attr_name);
|
3036 |
+
$product_data[$attr_name] = $attr_value;
|
3037 |
}
|
3038 |
}
|
3039 |
|
3059 |
$product_variations = new WC_Product_Variation( $product_data['id'] );
|
3060 |
$variations = $product_variations->get_variation_attributes();
|
3061 |
|
3062 |
+
// For Skroutz and Bestprice apparal products we can only append colours to the product name
|
3063 |
// When a product has both a size and color attribute we assume its an apparal product
|
3064 |
+
if(($project_config['fields'] == "skroutz") OR ($project_config['fields'] == "bestprice")){
|
3065 |
$size_found = "no";
|
3066 |
$color_found = "no";
|
3067 |
|
3479 |
*/
|
3480 |
$product_data['reviews'] = $this->woosea_get_reviews( $product_data, $product );
|
3481 |
|
3482 |
+
/**
|
3483 |
+
* Filter out reviews that do not have text
|
3484 |
+
*/
|
3485 |
+
if(!empty($product_data['reviews'])){
|
3486 |
+
foreach($product_data['reviews'] as $review_id => $review_details){
|
3487 |
+
if(empty($review_details['content'])){
|
3488 |
+
unset($product_data['reviews'][$review_id]);
|
3489 |
+
}
|
3490 |
+
}
|
3491 |
+
}
|
3492 |
+
|
3493 |
/**
|
3494 |
* Check if individual products need to be excluded
|
3495 |
*/
|
3555 |
// For these channels parent products are allowed
|
3556 |
$allowed_channel_parents = array(
|
3557 |
"skroutz",
|
3558 |
+
"bestprice",
|
3559 |
"google_dsa",
|
3560 |
"google_product_review",
|
3561 |
);
|
3562 |
|
3563 |
+
if(array_key_exists('fields', $project_config)){
|
3564 |
+
if (!in_array($project_config['fields'], $allowed_channel_parents)){
|
3565 |
+
if(($product->is_type('variable')) AND ($product_data['item_group_id'] == 0)){
|
3566 |
+
$product_data = array();
|
3567 |
+
$product_data = null;
|
3568 |
+
}
|
3569 |
+
}
|
3570 |
+
}
|
3571 |
|
3572 |
/**
|
3573 |
* Remove variation products that are not THE default variation product
|
4971 |
|
4972 |
foreach ($product_data as $pd_key => $pd_value){
|
4973 |
// Check is there is a rule on specific attributes
|
|
|
4974 |
if(in_array($pd_key, $pr_array, TRUE)){
|
4975 |
|
4976 |
if($pd_key == "price"){
|
5070 |
$in_tag_array = "yes";
|
5071 |
}
|
5072 |
}
|
5073 |
+
|
5074 |
if($in_tag_array == "yes"){
|
5075 |
//if(in_array($pr_array['criteria'], $pd_value, TRUE)) {
|
5076 |
$v = $pr_array['criteria'];
|
|
|
5077 |
switch ($pr_array['condition']) {
|
5078 |
case($pr_array['condition'] = "contains"):
|
5079 |
if ((preg_match('/'.$pr_array['criteria'].'/', $v))){
|
5175 |
if($allowed <> 0){
|
5176 |
$allowed = 1;
|
5177 |
}
|
5178 |
+
} else {
|
5179 |
+
if(!empty($pt_value)){
|
5180 |
+
$allowed = 1;
|
5181 |
+
} else {
|
5182 |
+
$allowed = 0;
|
5183 |
+
}
|
5184 |
}
|
5185 |
}
|
5186 |
break;
|
5363 |
}
|
5364 |
break;
|
5365 |
case($pr_array['condition'] = "="):
|
5366 |
+
if (($pr_array['criteria'] == "$pd_value") AND ($pr_array['than'] == "exclude")){
|
5367 |
$allowed = 0;
|
5368 |
} elseif (($pr_array['criteria'] != "$pd_value") && ($pr_array['than'] == "include_only")){
|
5369 |
$found = strpos($pd_value,$pr_array['criteria']);
|
5393 |
$allowed = 1;
|
5394 |
}
|
5395 |
} elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "exclude")){
|
5396 |
+
// $allowed = 0;
|
5397 |
} elseif ((preg_match('/'.$pr_array['criteria'].'/', $pd_value)) && ($pr_array['than'] == "include_only")){
|
5398 |
$allowed = 1;
|
5399 |
+
} else {
|
5400 |
+
$allowed = 1;
|
5401 |
+
}
|
5402 |
break;
|
5403 |
case($pr_array['condition'] = "!="):
|
5404 |
if (($pr_array['criteria'] == "$pd_value") && ($pr_array['than'] == "exclude")){
|
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=9.
|
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=9.5.9',
|
31 |
jsonp: 'callback',
|
32 |
dataType: 'jsonp',
|
33 |
type: 'GET',
|
js/woosea_manage.js
CHANGED
@@ -256,6 +256,26 @@ jQuery(function($) {
|
|
256 |
}
|
257 |
})
|
258 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
// Check if user would like to enable debug logging
|
260 |
$('#add_woosea_logging').on('change', function(){ // on change of state
|
261 |
if(this.checked){
|
256 |
}
|
257 |
})
|
258 |
|
259 |
+
// Check if user would like the plugin to remove the free shipping class
|
260 |
+
$('#remove_free_shipping').on('change', function(){ // on change of state
|
261 |
+
if(this.checked){
|
262 |
+
|
263 |
+
// Checkbox is on
|
264 |
+
jQuery.ajax({
|
265 |
+
method: "POST",
|
266 |
+
url: ajaxurl,
|
267 |
+
data: { 'action': 'woosea_remove_free_shipping', 'status': "on" }
|
268 |
+
})
|
269 |
+
} else {
|
270 |
+
// Checkbox is off
|
271 |
+
jQuery.ajax({
|
272 |
+
method: "POST",
|
273 |
+
url: ajaxurl,
|
274 |
+
data: { 'action': 'woosea_remove_free_shipping', 'status': "off" }
|
275 |
+
})
|
276 |
+
}
|
277 |
+
})
|
278 |
+
|
279 |
// Check if user would like to enable debug logging
|
280 |
$('#add_woosea_logging').on('change', function(){ // on change of state
|
281 |
if(this.checked){
|
pages/admin/woosea-manage-feed.php
CHANGED
@@ -67,6 +67,7 @@ if(!empty($license_information)){
|
|
67 |
if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
68 |
$notifications_box = $notifications_obj->get_admin_notifications ( '12', 'false' );
|
69 |
}
|
|
|
70 |
?>
|
71 |
<div class="wrap">
|
72 |
<div class="woo-product-feed-pro-form-style-2">
|
@@ -124,6 +125,18 @@ if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
|
124 |
<?php
|
125 |
}
|
126 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
127 |
?>
|
128 |
|
129 |
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
|
67 |
if (!wp_next_scheduled( 'woosea_cron_hook' ) ) {
|
68 |
$notifications_box = $notifications_obj->get_admin_notifications ( '12', 'false' );
|
69 |
}
|
70 |
+
|
71 |
?>
|
72 |
<div class="wrap">
|
73 |
<div class="woo-product-feed-pro-form-style-2">
|
125 |
<?php
|
126 |
}
|
127 |
}
|
128 |
+
|
129 |
+
|
130 |
+
if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
|
131 |
+
?>
|
132 |
+
<div class="notice notice-error is-dismissible">
|
133 |
+
<p>
|
134 |
+
<strong><?php _e( 'WARNING: Your WP-Cron is disabled', 'woo-product-feed-pro' );?></strong><br/></br/>
|
135 |
+
We detected that your WP-cron has been disabled in your wp-config.php file. Our plugin heavily depends on the WP-cron being active otherwise it cannot update and generate your product feeds. <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=cron-warning&utm_content=notification" target="_blank"><strong>Please enable your WP-cron first</strong></a>.
|
136 |
+
</p>
|
137 |
+
</div>
|
138 |
+
<?php
|
139 |
+
}
|
140 |
?>
|
141 |
|
142 |
<div class="woo-product-feed-pro-form-style-2-heading"><?php _e( 'Manage feeds','woo-product-feed-pro' );?></div>
|
pages/admin/woosea-manage-settings.php
CHANGED
@@ -101,6 +101,20 @@ if(isset($_GET["tab"])) {
|
|
101 |
?>
|
102 |
</span>
|
103 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
|
105 |
<!-- wordpress provides the styling for tabs. -->
|
106 |
<h2 class="nav-tab-wrapper">
|
@@ -290,6 +304,24 @@ if(isset($_GET["tab"])) {
|
|
290 |
</label>
|
291 |
</td>
|
292 |
</tr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
<tr>
|
294 |
<td>
|
295 |
<span><?php _e( 'Remove the local pickup shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
|
@@ -440,11 +472,11 @@ if(isset($_GET["tab"])) {
|
|
440 |
$external_path_tsv = $external_base . "/woo-product-feed-pro/";
|
441 |
$external_path_logs = $external_base . "/woo-product-feed-pro/";
|
442 |
$test_file = $external_path . "/tesfile.txt";
|
443 |
-
$test_file_xml = $external_path . "
|
444 |
-
$test_file_csv = $external_path . "
|
445 |
-
$test_file_txt = $external_path . "
|
446 |
-
$test_file_tsv = $external_path . "
|
447 |
-
$test_file_logs = $external_path . "
|
448 |
|
449 |
if (is_writable($external_path)) {
|
450 |
// Normal root category
|
@@ -515,6 +547,10 @@ if(isset($_GET["tab"])) {
|
|
515 |
$cron_enabled = "True";
|
516 |
}
|
517 |
|
|
|
|
|
|
|
|
|
518 |
print "<table class=\"woo-product-feed-pro-table\">";
|
519 |
print "<tr><td><strong>System check</strong></td><td><strong>Status</strong></td></tr>";
|
520 |
print "<tr><td>WP-Cron enabled</td><td>$cron_enabled</td></tr>";
|
101 |
?>
|
102 |
</span>
|
103 |
</div>
|
104 |
+
|
105 |
+
<?php
|
106 |
+
if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
|
107 |
+
?>
|
108 |
+
<div class="notice notice-error is-dismissible">
|
109 |
+
<p>
|
110 |
+
<strong><?php _e( 'WARNING: Your WP-Cron is disabled', 'woo-product-feed-pro' );?></strong><br/></br/>
|
111 |
+
We detected that your WP-cron has been disabled in your wp-config.php file. Our plugin heavily depends on the WP-cron being active for it to be able to update and generate your product feeds. More information on the inner workings of our plugin and instructions on how to enable your WP-Cron can be found here: <a href="https://adtribes.io/help-my-feed-processing-is-stuck/?utm_source=<?php print"$host";?>&utm_medium=manage-feed&utm_campaign=cron-warning&utm_content=notification" target="_blank"><strong>My feed won't update or is stuck processing</strong></a>.
|
112 |
+
</p>
|
113 |
+
</div>
|
114 |
+
<?php
|
115 |
+
}
|
116 |
+
?>
|
117 |
+
|
118 |
|
119 |
<!-- wordpress provides the styling for tabs. -->
|
120 |
<h2 class="nav-tab-wrapper">
|
304 |
</label>
|
305 |
</td>
|
306 |
</tr>
|
307 |
+
<tr>
|
308 |
+
<td>
|
309 |
+
<span><?php _e( 'Remove the free shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
|
310 |
+
</td>
|
311 |
+
<td>
|
312 |
+
<label class="woo-product-feed-pro-switch">
|
313 |
+
<?php
|
314 |
+
$remove_free_shipping = get_option ('remove_free_shipping');
|
315 |
+
if($remove_free_shipping == "yes"){
|
316 |
+
print "<input type=\"checkbox\" id=\"remove_free_shipping\" name=\"remove_free_shipping\" class=\"checkbox-field\" checked>";
|
317 |
+
} else {
|
318 |
+
print "<input type=\"checkbox\" id=\"remove_free_shipping\" name=\"remove_free_shipping\" class=\"checkbox-field\">";
|
319 |
+
}
|
320 |
+
?>
|
321 |
+
<div class="woo-product-feed-pro-slider round"></div>
|
322 |
+
</label>
|
323 |
+
</td>
|
324 |
+
</tr>
|
325 |
<tr>
|
326 |
<td>
|
327 |
<span><?php _e( 'Remove the local pickup shipping zone from feed (Google Shopping / Facebook only)', 'woo-product-feed-pro');?></span>
|
472 |
$external_path_tsv = $external_base . "/woo-product-feed-pro/";
|
473 |
$external_path_logs = $external_base . "/woo-product-feed-pro/";
|
474 |
$test_file = $external_path . "/tesfile.txt";
|
475 |
+
$test_file_xml = $external_path . "xml/tesfile.txt";
|
476 |
+
$test_file_csv = $external_path . "csv/tesfile.txt";
|
477 |
+
$test_file_txt = $external_path . "txt/tesfile.txt";
|
478 |
+
$test_file_tsv = $external_path . "tsv/tesfile.txt";
|
479 |
+
$test_file_logs = $external_path . "logs/tesfile.txt";
|
480 |
|
481 |
if (is_writable($external_path)) {
|
482 |
// Normal root category
|
547 |
$cron_enabled = "True";
|
548 |
}
|
549 |
|
550 |
+
if ( defined( 'DISABLE_WP_CRON' ) && DISABLE_WP_CRON ) {
|
551 |
+
$cron_enabled = "<strong>False</strong>";
|
552 |
+
}
|
553 |
+
|
554 |
print "<table class=\"woo-product-feed-pro-table\">";
|
555 |
print "<tr><td><strong>System check</strong></td><td><strong>Status</strong></td></tr>";
|
556 |
print "<tr><td>WP-Cron enabled</td><td>$cron_enabled</td></tr>";
|
readme.txt
CHANGED
@@ -5,11 +5,11 @@ 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.6
|
8 |
-
Stable tag: 9.
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
-
Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center), Facebook Remarketing, Bing Ads, Billiger.de, Pricerunner,
|
13 |
|
14 |
= Why choose this plugin? =
|
15 |
Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
|
@@ -175,6 +175,7 @@ Some of the above mentioned feature can only be used by users who upgraded to th
|
|
175 |
* <a href="https://www.beslist.nl" target="_blank" rel="nofollow">Beslist.nl</a>
|
176 |
* <a href="https://www.beslist.be" target="_blank" rel="nofollow">Beslist.be</a>
|
177 |
* <a href="https://www.fashionchick.nl" target="_blank">Fashionchick.nl</a>
|
|
|
178 |
* Bol.com
|
179 |
* Stylight
|
180 |
* Incurvy
|
@@ -322,6 +323,75 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
322 |
|
323 |
=== Changelog ===
|
324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
325 |
= 9.3.7 (2021-01-12) =
|
326 |
* Added the Bestprice.gr template
|
327 |
|
@@ -2988,6 +3058,75 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
2988 |
|
2989 |
== Upgrade Notice ==
|
2990 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2991 |
= 9.3.7 =
|
2992 |
Added the Bestprice.gr template
|
2993 |
|
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.6
|
8 |
+
Stable tag: 9.5.9
|
9 |
|
10 |
== Description ==
|
11 |
|
12 |
+
Generate WooCommerce product feeds for all your marketing channels, such as Google Shopping (merchant center), Facebook Remarketing, Bing Ads, Billiger.de, Pricerunner, Skroutz and many more. Next to custom feeds there are over 100 pre-defined templates included for marketplaces, comparison shopping engines and search engines. This plugin provides high-quality product feed for Google Shopping and many many more.
|
13 |
|
14 |
= Why choose this plugin? =
|
15 |
Simply because this is the most complete plugin offering support for an unlimited number of products and feeds, including features such as category- & field-mapping and advanced, rule-based, filtering and product variables support.
|
175 |
* <a href="https://www.beslist.nl" target="_blank" rel="nofollow">Beslist.nl</a>
|
176 |
* <a href="https://www.beslist.be" target="_blank" rel="nofollow">Beslist.be</a>
|
177 |
* <a href="https://www.fashionchick.nl" target="_blank">Fashionchick.nl</a>
|
178 |
+
* <a href="https://www.boetiek.nl" target="_blank">Boetiek.nl</a>
|
179 |
* Bol.com
|
180 |
* Stylight
|
181 |
* Incurvy
|
323 |
|
324 |
=== Changelog ===
|
325 |
|
326 |
+
= 9.5.9 (2021-02-19) =
|
327 |
+
* Added a fail-safe when users do not select a marketing channel which let to PHP notices in logs
|
328 |
+
|
329 |
+
= 9.5.8 (2021-02-18) =
|
330 |
+
* Added shipping class name attribute
|
331 |
+
|
332 |
+
= 9.5.7 (2021-02-17) =
|
333 |
+
* Dynamic attribute values are now also added to parent variable products for Skroutz feeds
|
334 |
+
|
335 |
+
= 9.5.6 (2021-02-17) =
|
336 |
+
* Changed attribute name primary category to Yoast primary category as it caused lots of confussion
|
337 |
+
|
338 |
+
= 9.5.5 (2021-02-11) =
|
339 |
+
* Fixed a PHP notice that showed when creating a new rule
|
340 |
+
* Tested for compatibility with WooCommerce 5.0
|
341 |
+
|
342 |
+
= 9.5.4 (2021-02-09) =
|
343 |
+
* When free shipping zones are removed do not remove the other shipping zones
|
344 |
+
|
345 |
+
= 9.5.3 (2021-02-08) =
|
346 |
+
* Added a feature to remove free shipping zones from Google and Facebook feeds
|
347 |
+
|
348 |
+
= 9.5.2 (2021-02-08) =
|
349 |
+
* Fixed a minor issue in exclude rules for WooCommerce category names
|
350 |
+
|
351 |
+
= 9.5.1 (2021-02-02) =
|
352 |
+
* Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
|
353 |
+
|
354 |
+
= 9.5.0 (2021-02-01) =
|
355 |
+
* Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
|
356 |
+
|
357 |
+
= 9.4.9 (2021-01-31) =
|
358 |
+
* Added a seperate sale price attribute for bundled products
|
359 |
+
* Reviews for parent variable products are removed, the reviews are attached to its variations
|
360 |
+
|
361 |
+
= 9.4.8 (2021-01-30) =
|
362 |
+
* Fixed an issue with the ecomm_prodid on the cart page
|
363 |
+
|
364 |
+
= 9.4.7 (2021-01-29) =
|
365 |
+
* Solved an issue that shipping costs to the first product in a custom feed where empty
|
366 |
+
|
367 |
+
= 9.4.6 (2021-01-28) =
|
368 |
+
* Added a new attribute: product description parent product
|
369 |
+
|
370 |
+
= 9.4.5 (2021-01-28) =
|
371 |
+
* Added a Google Shopping field to their template: g:ship_from_country
|
372 |
+
* Stripping & characters from review names as it breaks the review feeds
|
373 |
+
|
374 |
+
= 9.4.4 (2021-01-27) =
|
375 |
+
* Fixed an issue where reviews without review text caused the feed to be disapproved by Google. We now remove reviews from feeds that have no review texts.
|
376 |
+
|
377 |
+
= 9.4.3 (2021-01-27) =
|
378 |
+
* Fixed an issue with an undefined ecomm_price variable on product variable pages
|
379 |
+
|
380 |
+
= 9.4.2 (2021-01-26) =
|
381 |
+
* Added the Dutch Boetiek.nl template
|
382 |
+
|
383 |
+
= 9.4.1 (2021-01-19) =
|
384 |
+
* Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
|
385 |
+
|
386 |
+
= 9.4.0 (2021-01-14) =
|
387 |
+
* Added a WP-cron check and notifications
|
388 |
+
|
389 |
+
= 9.3.9 (2021-01-14) =
|
390 |
+
* Bestprice.gr apparel products are now grouped by color
|
391 |
+
|
392 |
+
= 9.3.8 (2021-01-13) =
|
393 |
+
* Tested for compatibility with WooCommerce 4.9
|
394 |
+
|
395 |
= 9.3.7 (2021-01-12) =
|
396 |
* Added the Bestprice.gr template
|
397 |
|
3058 |
|
3059 |
== Upgrade Notice ==
|
3060 |
|
3061 |
+
= 9.5.9 =
|
3062 |
+
* Added a fail-safe when users do not select a marketing channel which let to PHP notices in logs
|
3063 |
+
|
3064 |
+
= 9.5.8 =
|
3065 |
+
Added shipping class name attribute
|
3066 |
+
|
3067 |
+
= 9.5.7 =
|
3068 |
+
Dynamic attribute values are now also added to parent variable products for Skroutz feeds
|
3069 |
+
|
3070 |
+
= 9.5.6 =
|
3071 |
+
Changed attribute name primary category to Yoast primary category as it caused lots of confussion
|
3072 |
+
|
3073 |
+
= 9.5.5 =
|
3074 |
+
Fixed a PHP notice that showed when creating a new rule
|
3075 |
+
Tested for compatibility with WooCommerce 5.0
|
3076 |
+
|
3077 |
+
= 9.5.4 =
|
3078 |
+
When free shipping zones are removed do not remove the other shipping zones
|
3079 |
+
|
3080 |
+
= 9.5.3 =
|
3081 |
+
Added a feature to remove free shipping zones from Google and Facebook feeds
|
3082 |
+
|
3083 |
+
= 9.5.2 =
|
3084 |
+
Fixed a minor issue in exclude rules for WooCommerce category names
|
3085 |
+
|
3086 |
+
= 9.5.1 =
|
3087 |
+
Dynamic attributes without values that are used for product details should be skipped which not always happened. This is fixed now.
|
3088 |
+
|
3089 |
+
= 9.5.0 =
|
3090 |
+
Discount rules created with the FlyCart plugin did not make it to Skroutz feeds. This has been solved now
|
3091 |
+
|
3092 |
+
= 9.4.9 =
|
3093 |
+
Added a seperate sale price attribute for bundled products
|
3094 |
+
Reviews for parent variable products are removed, the reviews are attached to its variations
|
3095 |
+
|
3096 |
+
= 9.4.8 =
|
3097 |
+
Fixed an issue with the ecomm_prodid on the cart page
|
3098 |
+
|
3099 |
+
= 9.4.7 =
|
3100 |
+
Solved an issue that shipping costs to the first product in a custom feed where empty
|
3101 |
+
|
3102 |
+
= 9.4.6 =
|
3103 |
+
Added a new attribute: product description parent product
|
3104 |
+
|
3105 |
+
= 9.4.5 =
|
3106 |
+
Added a Google Shopping field to their template: g:ship_from_country
|
3107 |
+
Stripping & characters from review names as it breaks the review feeds
|
3108 |
+
|
3109 |
+
= 9.4.4 =
|
3110 |
+
Fixed an issue where reviews without review text caused the feed to be disapproved by Google. We now remove reviews from feeds that have no review texts.
|
3111 |
+
|
3112 |
+
= 9.4.3 =
|
3113 |
+
Fixed an issue with an undefined ecomm_price variable on product variable pages
|
3114 |
+
|
3115 |
+
= 9.4.2 =
|
3116 |
+
Added the Dutch Boetiek.nl template
|
3117 |
+
|
3118 |
+
= 9.4.1 =
|
3119 |
+
Fixed a bug: exclude filters on empty product tags were broken. This is fixed now.
|
3120 |
+
|
3121 |
+
= 9.4.0 =
|
3122 |
+
Added a WP-cron check and notifications
|
3123 |
+
|
3124 |
+
= 9.3.9 =
|
3125 |
+
Bestprice.gr apparel products are now grouped by color
|
3126 |
+
|
3127 |
+
= 9.3.8 =
|
3128 |
+
Tested for compatibility with WooCommerce 4.9
|
3129 |
+
|
3130 |
= 9.3.7 =
|
3131 |
Added the Bestprice.gr template
|
3132 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 9.
|
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
|
@@ -17,7 +17,7 @@
|
|
17 |
* Domain Path: /languages
|
18 |
*
|
19 |
* WC requires at least: 4.4
|
20 |
-
* WC tested up to:
|
21 |
*
|
22 |
* Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
|
23 |
* it under the terms of the GNU General Public License as published by
|
@@ -48,7 +48,7 @@ if (!defined('ABSPATH')) {
|
|
48 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
-
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '9.
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
@@ -347,7 +347,6 @@ function woosea_add_facebook_pixel( $product = null ){
|
|
347 |
$cats = str_replace("&","&", $cats);
|
348 |
|
349 |
if(!empty($fb_prodid)){
|
350 |
-
|
351 |
if(!$product) {
|
352 |
return -1;
|
353 |
}
|
@@ -622,7 +621,7 @@ function woosea_add_remarketing_tags( $product = null ){
|
|
622 |
// In that case we need to put in the AggregateOffer structured data
|
623 |
$variation_id = woosea_find_matching_product_variation( $product, $_GET );
|
624 |
$nr_get = count($_GET);
|
625 |
-
|
626 |
if($nr_get > 0){
|
627 |
$variable_product = wc_get_product($variation_id);
|
628 |
|
@@ -659,7 +658,9 @@ function woosea_add_remarketing_tags( $product = null ){
|
|
659 |
$ecomm_price = wc_format_decimal( $lowest, wc_get_price_decimals());
|
660 |
} else {
|
661 |
$ecomm_lowprice = wc_format_decimal( $lowest, wc_get_price_decimals() );
|
662 |
-
|
|
|
|
|
663 |
}
|
664 |
}
|
665 |
} else {
|
@@ -671,14 +672,18 @@ function woosea_add_remarketing_tags( $product = null ){
|
|
671 |
var google_tag_params = {
|
672 |
ecomm_prodid: <?php print "$ecomm_prodid";?>,
|
673 |
ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
|
674 |
-
ecomm_totalvalue:
|
675 |
};
|
676 |
</script>
|
677 |
|
678 |
<?php
|
679 |
}
|
680 |
} elseif ($ecomm_pagetype == "cart"){
|
681 |
-
|
|
|
|
|
|
|
|
|
682 |
?>
|
683 |
<script type="text/javascript">
|
684 |
var google_tag_params = {
|
@@ -804,6 +809,7 @@ function woosea_request_review(){
|
|
804 |
}
|
805 |
add_action('admin_notices', 'woosea_request_review');
|
806 |
|
|
|
807 |
/**
|
808 |
* Create a seperate MySql table for saving conversion information
|
809 |
*/
|
@@ -2285,6 +2291,21 @@ function woosea_local_pickup_shipping (){
|
|
2285 |
}
|
2286 |
add_action( 'wp_ajax_woosea_local_pickup_shipping', 'woosea_local_pickup_shipping' );
|
2287 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2288 |
/**
|
2289 |
* This function enables the setting to use
|
2290 |
* logging
|
@@ -4623,8 +4644,11 @@ add_action('wp_dashboard_setup', 'woosea_blog_widgets');
|
|
4623 |
/**
|
4624 |
* Creates the RSS metabox
|
4625 |
*/
|
|
|
|
|
|
|
|
|
4626 |
function woosea_my_rss_box() {
|
4627 |
-
|
4628 |
// Get RSS Feed(s)
|
4629 |
include_once(ABSPATH . WPINC . '/feed.php');
|
4630 |
$domain = $_SERVER['HTTP_HOST'];
|
@@ -4633,6 +4657,8 @@ function woosea_my_rss_box() {
|
|
4633 |
$my_feeds = array(
|
4634 |
'https://www.adtribes.io/feed/'
|
4635 |
);
|
|
|
|
|
4636 |
|
4637 |
// Loop through Feeds
|
4638 |
foreach ( $my_feeds as $feed) :
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 9.5.9
|
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
|
17 |
* Domain Path: /languages
|
18 |
*
|
19 |
* WC requires at least: 4.4
|
20 |
+
* WC tested up to: 5.0
|
21 |
*
|
22 |
* Product Feed PRO for WooCommerce is free software: you can redistribute it and/or modify
|
23 |
* it under the terms of the GNU General Public License as published by
|
48 |
* Plugin versionnumber, please do not override.
|
49 |
* Define some constants
|
50 |
*/
|
51 |
+
define( 'WOOCOMMERCESEA_PLUGIN_VERSION', '9.5.9' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
347 |
$cats = str_replace("&","&", $cats);
|
348 |
|
349 |
if(!empty($fb_prodid)){
|
|
|
350 |
if(!$product) {
|
351 |
return -1;
|
352 |
}
|
621 |
// In that case we need to put in the AggregateOffer structured data
|
622 |
$variation_id = woosea_find_matching_product_variation( $product, $_GET );
|
623 |
$nr_get = count($_GET);
|
624 |
+
|
625 |
if($nr_get > 0){
|
626 |
$variable_product = wc_get_product($variation_id);
|
627 |
|
658 |
$ecomm_price = wc_format_decimal( $lowest, wc_get_price_decimals());
|
659 |
} else {
|
660 |
$ecomm_lowprice = wc_format_decimal( $lowest, wc_get_price_decimals() );
|
661 |
+
$ecomm_highprice = wc_format_decimal( $highest, wc_get_price_decimals() );
|
662 |
+
$ecomm_price = $ecomm_lowprice;
|
663 |
+
|
664 |
}
|
665 |
}
|
666 |
} else {
|
672 |
var google_tag_params = {
|
673 |
ecomm_prodid: <?php print "$ecomm_prodid";?>,
|
674 |
ecomm_pagetype: '<?php print "$ecomm_pagetype";?>',
|
675 |
+
ecomm_totalvalue: <?php print "$ecomm_price";?>,
|
676 |
};
|
677 |
</script>
|
678 |
|
679 |
<?php
|
680 |
}
|
681 |
} elseif ($ecomm_pagetype == "cart"){
|
682 |
+
// Get the first product from cart and use that product ID
|
683 |
+
foreach( WC()->cart->get_cart() as $cart_item ){
|
684 |
+
$ecomm_prodid = $cart_item['product_id'];
|
685 |
+
break;
|
686 |
+
}
|
687 |
?>
|
688 |
<script type="text/javascript">
|
689 |
var google_tag_params = {
|
809 |
}
|
810 |
add_action('admin_notices', 'woosea_request_review');
|
811 |
|
812 |
+
|
813 |
/**
|
814 |
* Create a seperate MySql table for saving conversion information
|
815 |
*/
|
2291 |
}
|
2292 |
add_action( 'wp_ajax_woosea_local_pickup_shipping', 'woosea_local_pickup_shipping' );
|
2293 |
|
2294 |
+
/**
|
2295 |
+
* This function enables the setting to remove
|
2296 |
+
* free shipping zones
|
2297 |
+
*/
|
2298 |
+
function woosea_remove_free_shipping (){
|
2299 |
+
$status = sanitize_text_field($_POST['status']);
|
2300 |
+
|
2301 |
+
if ($status == "off"){
|
2302 |
+
update_option( 'remove_free_shipping', 'no', 'yes');
|
2303 |
+
} else {
|
2304 |
+
update_option( 'remove_free_shipping', 'yes', 'yes');
|
2305 |
+
}
|
2306 |
+
}
|
2307 |
+
add_action( 'wp_ajax_woosea_remove_free_shipping', 'woosea_remove_free_shipping' );
|
2308 |
+
|
2309 |
/**
|
2310 |
* This function enables the setting to use
|
2311 |
* logging
|
4644 |
/**
|
4645 |
* Creates the RSS metabox
|
4646 |
*/
|
4647 |
+
function woosea_feed_interval( $seconds ) {
|
4648 |
+
return 172800; // Cache the feed for 2 days
|
4649 |
+
}
|
4650 |
+
|
4651 |
function woosea_my_rss_box() {
|
|
|
4652 |
// Get RSS Feed(s)
|
4653 |
include_once(ABSPATH . WPINC . '/feed.php');
|
4654 |
$domain = $_SERVER['HTTP_HOST'];
|
4657 |
$my_feeds = array(
|
4658 |
'https://www.adtribes.io/feed/'
|
4659 |
);
|
4660 |
+
|
4661 |
+
add_filter( 'wp_feed_cache_transient_lifetime' , 'woosea_feed_interval' );
|
4662 |
|
4663 |
// Loop through Feeds
|
4664 |
foreach ( $my_feeds as $feed) :
|