Skip to content

Commit

Permalink
Make compatible with PHP 7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
jissereitsma committed Dec 11, 2024
1 parent 997ba82 commit 03ec4e3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion DataLayer/Event/Purchase.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function get(): array
'tax' => $this->priceFormatter->format((float)$order->getTaxAmount()),
'shipping' => $this->priceFormatter->format((float)$order->getShippingAmount()),
'coupon' => $order->getCouponCode(),
'payment_method' => $order->getPayment()?->getMethod() ?? '',
'payment_method' => $order->getPayment() ? $order->getPayment()->getMethod() ? '',
'items' => $this->orderItems->setOrder($order)->get(),
]
];
Expand Down
2 changes: 1 addition & 1 deletion DataLayer/Event/Refund.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function get(): array
'tax' => $this->priceFormatter->format((float)$order->getTaxAmount()),
'shipping' => $this->priceFormatter->format((float)$order->getShippingAmount()),
'coupon' => $order->getCouponCode(),
'payment_method' => $order->getPayment()?->getMethod() ?? '',
'payment_method' => $order->getPayment() ? $order->getPayment()->getMethod() ? '',
'items' => $this->orderItems->setOrder($order)->get(),
]
];
Expand Down
2 changes: 1 addition & 1 deletion DataLayer/Mapper/OrderDataMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function mapByOrder(OrderInterface $order): array
'coupon' => $order->getCouponCode(),
'date' => date("Y-m-d", strtotime($order->getCreatedAt())),
'paymentType' => $this->getPaymentType($order),
'payment_method' => $order->getPayment()?->getMethod() ?? '',
'payment_method' => $order->getPayment() ? $order->getPayment()->getMethod() ? '',
'customer' => $this->getCustomerData($order),
];
}
Expand Down
2 changes: 1 addition & 1 deletion DataLayer/Tag/Order/Order.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public function merge(): array
'affiliation' => $this->config->getStoreName(),
'transaction_id' => $order->getIncrementId(),
'coupon' => $order->getCouponCode(),
'payment_method' => $order->getPayment()?->getMethod() ?? '',
'payment_method' => $order->getPayment() ? $order->getPayment()->getMethod() ? ''
];
}

Expand Down

0 comments on commit 03ec4e3

Please sign in to comment.