1
0
mirror of synced 2025-02-21 17:33:13 +03:00

Add processing of all types of goods

This commit is contained in:
Dima Uryvskiy 2021-07-20 18:08:56 +03:00 committed by GitHub
parent 30f16915d9
commit bb0c17a0a8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,9 +359,9 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
);
foreach ($products as $offer) {
if ($offer->get_type() == 'simple') {
$this->setOffer($full_product_list, $product_attributes, $offer);
} elseif ($offer->get_type() == 'variable') {
$type = $offer->get_type();
if (strpos($type, 'variable') || strpos($type, 'variation')) {
foreach ($offer->get_children() as $child_id) {
$child_product = wc_get_product($child_id);
if (!$child_product) {
@ -370,6 +370,8 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
$this->setOffer($full_product_list, $product_attributes, $child_product, $offer);
}
} else {
$this->setOffer($full_product_list, $product_attributes, $offer);
}
}