Checkout form JS. Closes #1954.
This commit is contained in:
parent
d763b9bf05
commit
2f04ea576d
|
@ -66,7 +66,7 @@ jQuery(document).ready(function($) {
|
|||
success: function( response ) {
|
||||
if ( response ) {
|
||||
$('#order_review').after(response).remove();
|
||||
$('#order_review input[name=payment_method]:checked').click();
|
||||
$('#order_review input[name=payment_method]:checked');
|
||||
$('body').trigger('updated_checkout');
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -203,11 +203,11 @@ $available_methods = $woocommerce->shipping->get_available_shipping_methods();
|
|||
foreach ($available_gateways as $gateway ) :
|
||||
?>
|
||||
<li>
|
||||
<input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php if ($gateway->chosen) echo 'checked="checked"'; ?> />
|
||||
<input type="radio" id="payment_method_<?php echo $gateway->id; ?>" class="input-radio" name="payment_method" value="<?php echo esc_attr( $gateway->id ); ?>" <?php checked( $gateway->chosen, true ); ?> />
|
||||
<label for="payment_method_<?php echo $gateway->id; ?>"><?php echo $gateway->get_title(); ?> <?php echo $gateway->get_icon(); ?></label>
|
||||
<?php
|
||||
if ( $gateway->has_fields() || $gateway->get_description() ) :
|
||||
echo '<div class="payment_box payment_method_' . $gateway->id . '" style="display:none;">';
|
||||
echo '<div class="payment_box payment_method_' . $gateway->id . '" ' . ( $gateway->chosen ? '' : 'style="display:none;"' ) . '>';
|
||||
$gateway->payment_fields();
|
||||
echo '</div>';
|
||||
endif;
|
||||
|
|
Loading…
Reference in New Issue