Find the correct form element to update.
Previously it just found the first one, which made the second checkbox buggy.
This commit is contained in:
parent
e87cea8688
commit
b85d314d5d
|
@ -168,7 +168,10 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
$( '.wc-wizard-services' ).on( 'change', '.wc-wizard-shipping-method-enable', function() {
|
$( '.wc-wizard-services' ).on( 'change', '.wc-wizard-shipping-method-enable', function() {
|
||||||
var checked = $( this ).is( ':checked' );
|
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 )
|
$( this )
|
||||||
.closest( '.wc-wizard-service-item' )
|
.closest( '.wc-wizard-service-item' )
|
||||||
|
|
Loading…
Reference in New Issue