Skip to content

Commit 7270a84

Browse files
committed
fix: updated to check if any shippingMethod
1 parent 3c9b180 commit 7270a84

File tree

1 file changed

+3
-2
lines changed
  • src/app/code/community/Zendesk/Zendesk/Helper

1 file changed

+3
-2
lines changed

src/app/code/community/Zendesk/Zendesk/Helper/Data.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -552,6 +552,7 @@ public function getOrderDetailBasic($order)
552552
$currency = $order->getOrderCurrencyCode();
553553
$shippingAddress = $order->getShippingAddress();
554554
$shippingWithTax = $order->getShippingInclTax();
555+
$shippingMethod = $order->getShippingMethod();
555556

556557
$orderInfo = array(
557558
'id' => $order->getIncrementId(),
@@ -610,14 +611,14 @@ public function getOrderDetailBasic($order)
610611
);
611612
}
612613

613-
if ($shippingWithTax) {
614+
if ($shippingWithTax && $shippingMethod) {
614615
$shippingTax = $order->getShippingTaxAmount();
615616
$shippingItem = array(
616617
'type' => 'custom_item',
617618
'id' => 'shipping--'.$order->getEntityId(),
618619
'product_id' => $order->getEntityId(),
619620
'name' => 'shipping--'.$order->getShippingDescription(),
620-
'sku' => $order->getShippingMethod(),
621+
'sku' => $shippingMethod,
621622
'quantity' => 1,
622623
'refunded' => 0,
623624
'meta' => array(

0 commit comments

Comments
 (0)