Update plugin list on shipping zone toggle

This commit is contained in:
Paul Dechov 2018-05-02 23:35:42 -04:00
parent b57924fc01
commit 9cd72562a8
2 changed files with 11 additions and 10 deletions

View File

@ -207,16 +207,17 @@ jQuery( function( $ ) {
$( '.wc-wizard-service-enable input:checked' ).each( function() {
addPlugins( $( this ), '.wc-wizard-service-item' );
$( this ).closest( '.wc-wizard-service-item' ).find( 'input.payment-checkbox-input:checked' ).each( function() {
var $container = $( this ).closest( '.wc-wizard-service-item' );
$container.find( 'input.payment-checkbox-input:checked' ).each( function() {
addPlugins( $( this ), '.wc-wizard-service-settings' );
} );
} );
$( '.wc-wizard-shipping-method-select .method' ).each( function() {
var $this = $( this );
if ( 'live_rates' === $this.val() ) {
addPlugins( $this, '.wc-wizard-service-item' );
}
$container.find( '.wc-wizard-shipping-method-select .method' ).each( function() {
var $this = $( this );
if ( 'live_rates' === $this.val() ) {
addPlugins( $this, '.wc-wizard-service-item' );
}
} );
} );
$( '.recommended-item-checkbox:checked' ).each( function() {

View File

@ -873,7 +873,7 @@ class WC_Admin_Setup_Wizard {
</div>
<div class="wc-wizard-service-enable">
<span class="wc-wizard-service-toggle">
<input id="shipping_zones[domestic][enabled]" type="checkbox" name="shipping_zones[domestic][enabled]" value="yes" checked="checked" class="wc-wizard-shipping-method-enable" />
<input id="shipping_zones[domestic][enabled]" type="checkbox" name="shipping_zones[domestic][enabled]" value="yes" checked="checked" class="wc-wizard-shipping-method-enable" data-plugins="true" />
<label for="shipping_zones[domestic][enabled]">
</span>
</div>
@ -887,7 +887,7 @@ class WC_Admin_Setup_Wizard {
</div>
<div class="wc-wizard-service-enable">
<span class="wc-wizard-service-toggle">
<input id="shipping_zones[intl][enabled]" type="checkbox" name="shipping_zones[intl][enabled]" value="yes" checked="checked" class="wc-wizard-shipping-method-enable"/>
<input id="shipping_zones[intl][enabled]" type="checkbox" name="shipping_zones[intl][enabled]" value="yes" checked="checked" class="wc-wizard-shipping-method-enable" data-plugins="true" />
<label for="shipping_zones[intl][enabled]">
</span>
</div>