Merge pull request #19989 from woocommerce/fix/obw-settings-hidden-fields-as-required
OBW: Set only applicable fields as required when enabling shipping zone
This commit is contained in:
commit
ad85be2b4f
|
@ -110,9 +110,11 @@ 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();
|
||||
|
||||
$( this )
|
||||
.closest( '.wc-wizard-service-item' )
|
||||
.find( '.' + selectedMethod )
|
||||
.find( '.shipping-method-required-field' )
|
||||
.prop( 'required', checked );
|
||||
} );
|
||||
|
|
Loading…
Reference in New Issue