checkout loading tweak
This commit is contained in:
parent
59a49c6c5f
commit
e19505c6ab
|
@ -136,10 +136,6 @@ jQuery(document).ready(function($) {
|
|||
updateTimer = setTimeout( input_changed, '1000' );
|
||||
});
|
||||
|
||||
// Update on page load
|
||||
if ( woocommerce_params.is_checkout == 1 )
|
||||
$('body').trigger('update_checkout');
|
||||
|
||||
/* AJAX Coupon Form Submission */
|
||||
$('form.checkout_coupon').submit( function() {
|
||||
var $form = $(this);
|
||||
|
@ -328,5 +324,15 @@ jQuery(document).ready(function($) {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
// Init trigger
|
||||
$('body').bind('init_checkout', function() {
|
||||
$('select.country_to_state').change();
|
||||
$('body').trigger('update_checkout');
|
||||
});
|
||||
|
||||
// Update on page load
|
||||
if ( woocommerce_params.is_checkout == 1 )
|
||||
$('body').trigger('init_checkout');
|
||||
|
||||
});
|
File diff suppressed because one or more lines are too long
|
@ -1131,7 +1131,7 @@ class Woocommerce {
|
|||
wp_enqueue_script( 'wc-cart', $frontend_script_path . 'cart' . $suffix . '.js', array( 'jquery' ), $this->version, true );
|
||||
|
||||
if ( is_checkout() )
|
||||
wp_enqueue_script( 'wc-checkout', $frontend_script_path . 'checkout' . $suffix . '.js', array( 'jquery' ), $this->version, true );
|
||||
wp_enqueue_script( 'wc-checkout', $frontend_script_path . 'checkout' . $suffix . '.js', array( 'jquery', 'woocommerce' ), $this->version, true );
|
||||
|
||||
if ( is_product() )
|
||||
wp_enqueue_script( 'wc-single-product' );
|
||||
|
|
Loading…
Reference in New Issue