Merge pull request #22459 from woocommerce/fix/21770
Prevent selected payment method description box from sliding up
This commit is contained in:
commit
ac29165892
|
@ -77,10 +77,12 @@ jQuery( function( $ ) {
|
|||
$payment_methods.eq(0).prop( 'checked', true );
|
||||
}
|
||||
|
||||
if ( $payment_methods.length > 1 ) {
|
||||
// Get name of new selected method.
|
||||
var checkedPaymentMethod = $payment_methods.filter( ':checked' ).eq(0).prop( 'id' );
|
||||
|
||||
if ( $payment_methods.length > 1 ) {
|
||||
// Hide open descriptions.
|
||||
$( 'div.payment_box' ).filter( ':visible' ).slideUp( 0 );
|
||||
$( 'div.payment_box:not(".' + checkedPaymentMethod + '")' ).filter( ':visible' ).slideUp( 0 );
|
||||
}
|
||||
|
||||
// Trigger click event for selected method
|
||||
|
|
Loading…
Reference in New Issue