Skip to content

Commit

Permalink
Only toggle visibility when we're on an Amazon Checkout session (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
msaggiorato authored Feb 25, 2021
1 parent e20fa44 commit 0c7cfae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion assets/js/amazon-app-widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,10 +683,10 @@ jQuery( function( $ ) {
}

$( 'body' ).on( 'updated_checkout', function() {
toggleFieldVisibility( 'shipping', 'state' );
if( ! isAmazonCheckout() ) {
return;
}
toggleFieldVisibility( 'shipping', 'state' );
if ( $( '.woocommerce-billing-fields .woocommerce-billing-fields__field-wrapper > *' ).length > 0 ) {
$( '.woocommerce-billing-fields' ).insertBefore( '#payment' );
}
Expand Down

0 comments on commit 0c7cfae

Please sign in to comment.