修复游客结账时有缘shippingAddress和Paymentaddress为空导致税没计算出来的问题。

This commit is contained in:
TL 2023-03-16 16:37:22 +08:00
parent ee06e1dbf5
commit aacda723b2
1 changed files with 2 additions and 2 deletions

View File

@ -63,8 +63,8 @@ class TotalService
public function getTaxes(): array
{
$addressInfo = [
'shipping_address' => $this->currentCart->shippingAddress,
'payment_address' => $this->currentCart->paymentAddress,
'shipping_address' => $this->currentCart->shippingAddress ?? $this->currentCart->guest_shipping_address,
'payment_address' => $this->currentCart->paymentAddress ?? $this->currentCart->guest_payment_address,
];
$taxLib = Tax::getInstance($addressInfo);