1
0
Fork 0
mirror of synced 2025-04-06 07:13:33 +03:00

Add process all type products

This commit is contained in:
dima-uryvskiy 2021-07-19 17:41:27 +03:00
parent 30f16915d9
commit 0521060885

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);
}
}