Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
sync shipping phone to billing
Browse files Browse the repository at this point in the history
  • Loading branch information
senadir committed Aug 15, 2023
1 parent a876944 commit 29b9e27
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ const Block = ( {
setBillingAddress,
shippingAddress,
billingAddress,
setBillingPhone,
setShippingPhone,
useShippingAsBilling,
setUseShippingAsBilling,
Expand Down Expand Up @@ -156,6 +157,12 @@ const Block = ( {
value={ shippingAddress.phone }
onChange={ ( value ) => {
setShippingPhone( value );
if ( useShippingAsBilling ) {
setBillingPhone( value );
dispatchCheckoutEvent( 'set-phone-number', {
step: 'biling',
} );
}
dispatchCheckoutEvent( 'set-phone-number', {
step: 'shipping',
} );
Expand Down

0 comments on commit 29b9e27

Please sign in to comment.