Skip to content

Commit 0c799d3

Browse files
Merge remote-tracking branch '37688/2.4-develop' into comm_jul
2 parents d93de71 + 116864c commit 0c799d3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

app/code/Magento/GoogleGtag/Block/Ga.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public function getOrdersTrackingData(): array
159159
'value' => number_format((float) $order->getGrandTotal(), 2),
160160
'tax' => number_format((float) $order->getTaxAmount(), 2),
161161
'shipping' => number_format((float) $order->getShippingAmount(), 2),
162+
'currency' => $order->getOrderCurrencyCode(),
162163
];
163164
$result['currency'] = $order->getOrderCurrencyCode();
164165
}

app/code/Magento/GoogleGtag/Test/Unit/Block/GaTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,8 @@ public function testOrderTrackingData()
166166
'affiliation' => 'test',
167167
'value' => 10.00,
168168
'tax' => 2.00,
169-
'shipping' => 1.00
169+
'shipping' => 1.00,
170+
'currency' => 'USD'
170171
]
171172
],
172173
'products' => [
@@ -223,7 +224,7 @@ protected function createOrderMock($orderItemCount = 1)
223224
$orderMock->expects($this->once())->method('getGrandTotal')->willReturn(10);
224225
$orderMock->expects($this->once())->method('getTaxAmount')->willReturn(2);
225226
$orderMock->expects($this->once())->method('getShippingAmount')->willReturn($orderItemCount);
226-
$orderMock->expects($this->once())->method('getOrderCurrencyCode')->willReturn('USD');
227+
$orderMock->expects($this->exactly(2))->method('getOrderCurrencyCode')->willReturn('USD');
227228
return $orderMock;
228229
}
229230

0 commit comments

Comments
 (0)