diff --git a/assets/js/frontend/checkout.js b/assets/js/frontend/checkout.js index 44dfefa228e..3490910793b 100644 --- a/assets/js/frontend/checkout.js +++ b/assets/js/frontend/checkout.js @@ -356,6 +356,8 @@ jQuery( function( $ ) { } } }); + + // console.log(paymentDetails); // Always update the fragments if ( data && data.fragments ) { @@ -374,10 +376,11 @@ jQuery( function( $ ) { if ( ! $.isEmptyObject( paymentDetails ) ) { $( '.payment_box :input' ).each( function() { var ID = $( this ).attr( 'id' ); - if ( ID ) { if ( $.inArray( $( this ).attr( 'type' ), [ 'checkbox', 'radio' ] ) !== -1 ) { $( this ).prop( 'checked', paymentDetails[ ID ] ).change(); + } else if ( $.inArray( $( this ).attr( 'type' ), [ 'select' ] ) !== -1 ) { + $( this ).val( paymentDetails[ ID ] ).change(); } else if ( null !== $( this ).val() && 0 === $( this ).val().length ) { $( this ).val( paymentDetails[ ID ] ).change(); }