Do not add shipping if has all properties are empty

This commit is contained in:
Emili Castells Guasch 2025-08-08 11:45:13 +02:00
parent 64c140ab23
commit e1c8b223d2
No known key found for this signature in database

View file

@ -250,7 +250,7 @@ class PurchaseUnitFactory {
}
$shipping = null;
try {
if ( isset( $data->shipping ) ) {
if ( isset( $data->shipping ) && ! empty( (array) $data->shipping ) ) {
$shipping = $this->shipping_factory->from_paypal_response( $data->shipping );
}
} catch ( RuntimeException $error ) {