Merge pull request #20174 from ChaseWiseman/fix/show-single-payment-methods-pay-page
Only hide .payment_box elements on init for multiple payment methods
This commit is contained in:
commit
65bbcfee96
|
@ -77,8 +77,11 @@ jQuery( function( $ ) {
|
|||
$payment_methods.eq(0).prop( 'checked', true );
|
||||
}
|
||||
|
||||
// Hide open descriptions.
|
||||
$( 'div.payment_box' ).filter( ':visible' ).slideUp( 0 );
|
||||
if ( $payment_methods.length > 1 ) {
|
||||
|
||||
// Hide open descriptions.
|
||||
$( 'div.payment_box' ).filter( ':visible' ).slideUp( 0 );
|
||||
}
|
||||
|
||||
// Trigger click event for selected method
|
||||
$payment_methods.filter( ':checked' ).eq(0).trigger( 'click' );
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue