Merge pull request #25540 from woocommerce/fix/25358

Find the correct form element to update.
This commit is contained in:
Vedanshu Jain 2020-02-04 12:38:03 +05:30 committed by GitHub
commit a85dc86978
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -168,7 +168,10 @@ jQuery( function( $ ) {
$( '.wc-wizard-services' ).on( 'change', '.wc-wizard-shipping-method-enable', function() {
var checked = $( this ).is( ':checked' );
var selectedMethod = $( '.wc-wizard-shipping-method-select .method' ).val();
var selectedMethod = $( this )
.closest( '.wc-wizard-service-item' )
.find( '.wc-wizard-shipping-method-select .method' )
.val();
$( this )
.closest( '.wc-wizard-service-item' )