Check for address on shippingData (https://github.com/woocommerce/woocommerce-blocks/pull/8878)
This commit is contained in:
parent
3d1caca059
commit
be2ba748be
|
@ -109,10 +109,13 @@ export const __internalEmitPaymentProcessingEvent: emitProcessingEventType = (
|
|||
);
|
||||
}
|
||||
|
||||
if ( shippingDataFromResponse ) {
|
||||
if (
|
||||
objectHasProp( shippingDataFromResponse, 'address' ) &&
|
||||
shippingDataFromResponse.address
|
||||
) {
|
||||
// Set this here so that old extensions still using shippingData can set the shippingAddress.
|
||||
shippingAddress =
|
||||
shippingDataFromResponse as ShippingAddress;
|
||||
shippingDataFromResponse.address as ShippingAddress;
|
||||
deprecated(
|
||||
'returning shippingData from an onPaymentProcessing observer in WooCommerce Blocks',
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue