Version Description
Solved this error for Skroutz feed: Call to undefined method WC_Product_Simple::get_available_variations()
Download this release
Release Info
Developer | jorisverwater |
Plugin | Product Feed PRO for WooCommerce |
Version | 11.1.6 |
Comparing to | |
See all releases |
Code changes from version 11.1.5 to 11.1.6
- classes/class-get-products.php +43 -38
- js/woosea_key.js +1 -1
- readme.txt +7 -1
- woocommerce-sea.php +2 -2
classes/class-get-products.php
CHANGED
@@ -4238,50 +4238,55 @@ class WooSEA_Get_Products {
|
|
4238 |
if(isset($product_data['item_group_id']) AND ($product_data['product_type'] == "variation")){
|
4239 |
if($product_data['item_group_id'] > 0){
|
4240 |
$product_skroutz = wc_get_product($product_data['item_group_id']);
|
4241 |
-
|
4242 |
-
|
4243 |
-
|
4244 |
-
|
4245 |
-
|
4246 |
-
|
4247 |
-
|
|
|
|
|
4248 |
|
4249 |
-
|
4250 |
-
|
4251 |
-
|
4252 |
-
|
4253 |
-
|
4254 |
-
|
4255 |
|
4256 |
-
|
4257 |
-
|
4258 |
-
|
4259 |
-
|
4260 |
-
|
4261 |
-
|
4262 |
-
|
4263 |
-
|
4264 |
-
|
4265 |
-
|
4266 |
-
|
4267 |
-
|
4268 |
-
|
4269 |
-
|
4270 |
-
|
4271 |
-
|
4272 |
-
|
4273 |
-
|
4274 |
-
|
4275 |
-
|
4276 |
-
|
4277 |
-
|
4278 |
-
|
4279 |
-
|
|
|
4280 |
}
|
|
|
4281 |
}
|
|
|
4282 |
}
|
4283 |
}
|
4284 |
-
}
|
4285 |
} else {
|
4286 |
// This is a parent variable product
|
4287 |
$product_skroutz = wc_get_product($product_data['id']);
|
4238 |
if(isset($product_data['item_group_id']) AND ($product_data['product_type'] == "variation")){
|
4239 |
if($product_data['item_group_id'] > 0){
|
4240 |
$product_skroutz = wc_get_product($product_data['item_group_id']);
|
4241 |
+
|
4242 |
+
if ( $product_skroutz ) {
|
4243 |
+
$variations = $product_skroutz->get_available_variations();
|
4244 |
+
$variations_id = wp_list_pluck( $variations, 'variation_id' );
|
4245 |
+
$total_quantity = 0;
|
4246 |
+
$quantity_variation = 0;
|
4247 |
+
|
4248 |
+
foreach($variations_id as $var_id){
|
4249 |
+
$clr_variation = get_post_meta( $var_id, "attribute_".$clr_attribute, true );
|
4250 |
|
4251 |
+
// Sum quantity of variations
|
4252 |
+
$quantity_variation = $this->get_attribute_value( $var_id, "_stock" );
|
4253 |
+
if(!empty($quantity_variation)){
|
4254 |
+
$total_quantity += $quantity_variation;
|
4255 |
+
}
|
4256 |
+
$product_data['quantity'] = $total_quantity;
|
4257 |
|
4258 |
+
if (isset($sz_attribute)) {
|
4259 |
+
$size_variation = get_post_meta( $var_id, "attribute_".$sz_attribute, true );
|
4260 |
+
}
|
4261 |
+
$stock_variation = get_post_meta( $var_id, "_stock_status", true );
|
4262 |
+
|
4263 |
+
if($clr_variation == $clr_attr_value){
|
4264 |
+
if($stock_variation == "outofstock"){
|
4265 |
+
// Remove this size as it is not on stock
|
4266 |
+
if(isset($sz_attribute)){
|
4267 |
+
if(array_key_exists($sz_attribute, $product_data)){
|
4268 |
+
$product_data[$sz_attribute] = str_replace(ucfirst($size_variation),"",$product_data[$sz_attribute]);
|
4269 |
+
$product_data[$sz_attribute] = str_replace(", , ",",",$product_data[$sz_attribute]);
|
4270 |
+
$product_data[$sz_attribute] = rtrim($product_data[$sz_attribute], " ");
|
4271 |
+
$product_data[$sz_attribute] = trim($product_data[$sz_attribute], ",");
|
4272 |
+
}
|
4273 |
+
}
|
4274 |
+
} else {
|
4275 |
+
// Add comma's in the size field and put availability on stock as at least one variation is on stock
|
4276 |
+
if(isset($size_variation)){
|
4277 |
+
$size_variation_new = $size_variation.",";
|
4278 |
+
if ($sz_attribute) {
|
4279 |
+
$product_data[$sz_attribute] = str_replace($size_variation,$size_variation_new,$product_data[$sz_attribute]);
|
4280 |
+
$product_data[$sz_attribute] = trim($product_data[$sz_attribute], ",");
|
4281 |
+
$product_data['availability'] = "in stock";
|
4282 |
+
}
|
4283 |
}
|
4284 |
+
|
4285 |
}
|
4286 |
+
|
4287 |
}
|
4288 |
}
|
4289 |
+
}
|
4290 |
} else {
|
4291 |
// This is a parent variable product
|
4292 |
$product_skroutz = wc_get_product($product_data['id']);
|
js/woosea_key.js
CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function($) {
|
|
26 |
var license_key = $('#license-key').val();
|
27 |
|
28 |
jQuery.ajax({
|
29 |
-
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.1.
|
30 |
jsonp: 'callback',
|
31 |
dataType: 'jsonp',
|
32 |
type: 'GET',
|
26 |
var license_key = $('#license-key').val();
|
27 |
|
28 |
jQuery.ajax({
|
29 |
+
url: 'https://www.adtribes.io/check/license.php?key=' + license_key + '&email=' + license_email + '&domain=' + root_domain + '&version=11.1.6',
|
30 |
jsonp: 'callback',
|
31 |
dataType: 'jsonp',
|
32 |
type: 'GET',
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ License URI: http://www.gnu.org/licenses/gpl.html
|
|
5 |
Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
|
6 |
Requires at least: 4.5
|
7 |
Tested up to: 5.8
|
8 |
-
Stable tag: 11.1.
|
9 |
|
10 |
== Description ==
|
11 |
|
@@ -337,6 +337,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
337 |
|
338 |
=== Changelog ===
|
339 |
|
|
|
|
|
|
|
340 |
= 11.1.5 (2022-01-20) =
|
341 |
* Added support for the Mall.sk media (image) URL field
|
342 |
|
@@ -3563,6 +3566,9 @@ Questions left or unanswered? Please do not hesitate to contact us at support@ad
|
|
3563 |
|
3564 |
== Upgrade Notice ==
|
3565 |
|
|
|
|
|
|
|
3566 |
= 11.1.5 =
|
3567 |
Added support for the Mall.sk media (image) URL field
|
3568 |
|
5 |
Tags: Google Shopping Feed, WooCommerce Product Feed, Facebook Product Feed, Bing Shopping Feed, Bing Product Feed, Google Merchant Feed, Skroutz, Google Product Feed, Pinterest, Idealo, Facebook Pixel, Facebook Conversion API
|
6 |
Requires at least: 4.5
|
7 |
Tested up to: 5.8
|
8 |
+
Stable tag: 11.1.6
|
9 |
|
10 |
== Description ==
|
11 |
|
337 |
|
338 |
=== Changelog ===
|
339 |
|
340 |
+
= 11.1.6 (2022-01-20) =
|
341 |
+
* Solved this error for Skroutz feed: Call to undefined method WC_Product_Simple::get_available_variations()
|
342 |
+
|
343 |
= 11.1.5 (2022-01-20) =
|
344 |
* Added support for the Mall.sk media (image) URL field
|
345 |
|
3566 |
|
3567 |
== Upgrade Notice ==
|
3568 |
|
3569 |
+
= 11.1.6 =
|
3570 |
+
Solved this error for Skroutz feed: Call to undefined method WC_Product_Simple::get_available_variations()
|
3571 |
+
|
3572 |
= 11.1.5 =
|
3573 |
Added support for the Mall.sk media (image) URL field
|
3574 |
|
woocommerce-sea.php
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
-
* Version: 11.1.
|
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, Skroutz, 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', '11.1.
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|
1 |
<?php
|
2 |
/**
|
3 |
* Plugin Name: Product Feed PRO for WooCommerce
|
4 |
+
* Version: 11.1.6
|
5 |
* Plugin URI: https://www.adtribes.io/support/?utm_source=wpadmin&utm_medium=plugin&utm_campaign=woosea_product_feed_pro
|
6 |
* Description: Configure and maintain your WooCommerce product feeds for Google Shopping, Facebook, Remarketing, Bing, Skroutz, 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', '11.1.6' );
|
52 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME', 'woocommerce-product-feed-pro' );
|
53 |
define( 'WOOCOMMERCESEA_PLUGIN_NAME_SHORT', 'woo-product-feed-pro' );
|
54 |
|