mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'master' of github.com:inpsyde/woocommerce-paypal-commerce-gateway
This commit is contained in:
commit
0a4d6d61f2
1 changed files with 3 additions and 2 deletions
|
@ -8,7 +8,6 @@ use Inpsyde\PayPalCommerce\ApiClient\Entity\AmountBreakdown;
|
|||
use Inpsyde\PayPalCommerce\ApiClient\Entity\Item;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Entity\Money;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Entity\PurchaseUnit;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Entity\Shipping;
|
||||
use Inpsyde\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
|
||||
class PurchaseUnitFactory
|
||||
|
@ -105,7 +104,9 @@ class PurchaseUnitFactory
|
|||
$breakdown
|
||||
);
|
||||
$shipping = $this->shippingFactory->fromWcOrder($order);
|
||||
if ($shipping->address()->countryCode() && !$shipping->address()->postalCode()) {
|
||||
if (empty($shipping->address()->countryCode()) ||
|
||||
($shipping->address()->countryCode() && !$shipping->address()->postalCode())
|
||||
) {
|
||||
$shipping = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue