1
0
Fork 0
mirror of synced 2025-03-28 19:35:12 +03:00

Fix misprint in dimensions

This commit is contained in:
Dima Uryvskiy 2021-04-23 15:02:24 +03:00 committed by GitHub
parent 523f4bf2a9
commit d1d2037bf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -250,8 +250,8 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
array_walk($offer['params'], array($this, 'setOffersParams'), $e); array_walk($offer['params'], array($this, 'setOffersParams'), $e);
} }
if (array_key_exists('dimension', $offer)) { if (array_key_exists('dimensions', $offer)) {
$e->addChild('dimension', $offer['dimension']); $e->addChild('dimensions', $offer['dimensions']);
} }
if (array_key_exists('weight', $offer)) { if (array_key_exists('weight', $offer)) {
@ -471,18 +471,18 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
} }
} }
$dimension = ''; $dimensions = '';
if ($product->get_length() != '') { if ($product->get_length() != '') {
$dimension = wc_get_dimension($product->get_length(), 'cm'); $dimensions = wc_get_dimension($product->get_length(), 'cm');
} }
if ($product->get_width() != '') { if ($product->get_width() != '') {
$dimension .= '/' . wc_get_dimension($product->get_width(), 'cm'); $dimensions .= '/' . wc_get_dimension($product->get_width(), 'cm');
} }
if ($product->get_height() != '') { if ($product->get_height() != '') {
$dimension .= '/' . wc_get_dimension($product->get_height(), 'cm'); $dimensions .= '/' . wc_get_dimension($product->get_height(), 'cm');
} }
$weight = ''; $weight = '';
@ -506,7 +506,7 @@ if ( ! class_exists( 'WC_Retailcrm_Icml' ) ) :
'url' => ($product->get_parent_id() > 0) ? $parent->get_permalink() : $product->get_permalink(), 'url' => ($product->get_parent_id() > 0) ? $parent->get_permalink() : $product->get_permalink(),
'quantity' => is_null($product->get_stock_quantity()) ? 0 : $product->get_stock_quantity(), 'quantity' => is_null($product->get_stock_quantity()) ? 0 : $product->get_stock_quantity(),
'categoryId' => $term_list, 'categoryId' => $term_list,
'dimension' => $dimension, 'dimensions' => $dimensions,
'weight' => $weight, 'weight' => $weight,
'tax' => isset($tax) ? $tax['rate'] : 'none' 'tax' => isset($tax) ? $tax['rate'] : 'none'
); );