parent
80f266dcd0
commit
be47710291
2 changed files with 2 additions and 2 deletions
|
@ -465,7 +465,7 @@ if (!class_exists('WC_Retailcrm_Orders')) :
|
|||
|
||||
if ($crmOrder) {
|
||||
foreach ($crmOrder['items'] as $item) {
|
||||
$externalId = $item['externalids'][0]['value'];
|
||||
$externalId = $item['externalIds'][0]['value'];
|
||||
$externalId = preg_replace('/^\d+\_/m', '', $externalId);
|
||||
$crmItems[$externalId] = $item;
|
||||
|
||||
|
|
|
@ -125,7 +125,7 @@ class WC_Retailcrm_Order_Item extends WC_Retailcrm_Abstracts_Data
|
|||
if ($crmItem) {
|
||||
$loyaltyDiscount = 0;
|
||||
|
||||
foreach ($item['discounts'] as $discount) {
|
||||
foreach ($crmItem['discounts'] as $discount) {
|
||||
if (in_array($discount['type'], ['bonus_charge', 'loyalty_level'])) {
|
||||
$loyaltyDiscount += $discount['amount'];
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue