Switch to general panel when virtual is enabled and on shipping tab closes #28267
This commit is contained in:
parent
97c0a62f7e
commit
beebbb8e25
|
@ -146,6 +146,11 @@ jQuery( function( $ ) {
|
||||||
}
|
}
|
||||||
if ( is_virtual ) {
|
if ( is_virtual ) {
|
||||||
$( '.show_if_virtual' ).show();
|
$( '.show_if_virtual' ).show();
|
||||||
|
|
||||||
|
// If user enables virtual while on shipping tab, switch to general tab.
|
||||||
|
if ( $( '.shipping_options.shipping_tab' ).hasClass( 'active' ) ) {
|
||||||
|
$( '.general_options.general_tab > a' ).trigger( 'click' );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$( '.show_if_' + product_type ).show();
|
$( '.show_if_' + product_type ).show();
|
||||||
|
|
Loading…
Reference in New Issue