Skip to content

Commit

Permalink
Prevent multiple pickup_location resets within block.
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisnissle committed Apr 16, 2024
1 parent dff37f5 commit fd4de94
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,9 @@ const render = () => {
if ( ! pickupLocationDeliveryAvailable || ! currentLocation ) {
let showNotice = checkoutOptions.pickup_location ? true : false;

setOption( 'pickup_location', '' );

if ( showNotice ) {
setOption( 'pickup_location', '' );

dispatch( 'core/notices' ).createNotice(
'warning',
_x( 'Your pickup location chosen is not available any longer. Please review your shipping address.', 'shipments', 'woocommerce-germanized-shipments' ),
Expand Down

0 comments on commit fd4de94

Please sign in to comment.