mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Do not add shipping if has all properties are empty
This commit is contained in:
parent
64c140ab23
commit
e1c8b223d2
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ class PurchaseUnitFactory {
|
||||||
}
|
}
|
||||||
$shipping = null;
|
$shipping = null;
|
||||||
try {
|
try {
|
||||||
if ( isset( $data->shipping ) ) {
|
if ( isset( $data->shipping ) && ! empty( (array) $data->shipping ) ) {
|
||||||
$shipping = $this->shipping_factory->from_paypal_response( $data->shipping );
|
$shipping = $this->shipping_factory->from_paypal_response( $data->shipping );
|
||||||
}
|
}
|
||||||
} catch ( RuntimeException $error ) {
|
} catch ( RuntimeException $error ) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue