Pages

Sep 9, 2021

List of Woocommerce Javascript events

Woocommerce Javascript events


Woocommerce Checkout JS events


$( document.body ).trigger( 'init_checkout' );
$( document.body ).trigger( 'payment_method_selected' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_checkout' );
$( document.body ).trigger( 'checkout_error' );
$( document.body ).trigger( 'applied_coupon_in_checkout' );
$( document.body ).trigger( 'removed_coupon_in_checkout' );

Woocommerce cart page JS events


$( document.body ).trigger( 'wc_cart_emptied' );
$( document.body ).trigger( 'update_checkout' );
$( document.body ).trigger( 'updated_wc_div' );
$( document.body ).trigger( 'updated_cart_totals' );
$( document.body ).trigger( 'country_to_state_changed' );
$( document.body ).trigger( 'updated_shipping_method' );
$( document.body ).trigger( 'applied_coupon', [ coupon_code ] );
$( document.body ).trigger( 'removed_coupon', [ coupon ] );

Woocommerce Single product page JS events


$( '.wc-tabs-wrapper, .woocommerce-tabs, #rating' ).trigger( 'init' );

Woocommerce Variable product page JS events

$( document.body ).trigger( 'found_variation', [variation] );


Woocommerce Add to cart JS events


$( document.body ).trigger( 'adding_to_cart', [ $thisbutton, data ] );
$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $thisbutton ] );
$( document.body ).trigger( 'removed_from_cart', [ response.fragments, response.cart_hash, $thisbutton ] );
$( document.body ).trigger( 'wc_cart_button_updated', [ $button ] );
$( document.body ).trigger( 'cart_page_refreshed' );
$( document.body ).trigger( 'cart_totals_refreshed' );
$( document.body ).trigger( 'wc_fragments_loaded' );


Woocommerce Add payment method JS events


$( document.body ).trigger( 'init_add_payment_method' );

To bind listener to these events, use:

jQuery('<event_target>').on('<event_name>', function(){
    console.log('<event_name> triggered');
});
  
  
Example :

jQuery('body').on('init_checkout', function(){
    console.log('init_checkout triggered');
    // now.do.whatever();
});
  

Mar 2, 2021

2021: best hosting for wordpress ecommerce

2021: best hosting for wordpress ecommerce
# PRODUCT URL PRICE CPU RAM SSD BANDWIDTH DEDICATED IP SSL Email OTHER
1 hostgator https://www.hostgator.in/vps-hosting 3599 INR/month 4 Core CPU 8 GB RAM 120 GB SSD 2 TB Bandwidth 1 Free Dedicated Ips FREE Yes Free Website Migration
2 bluehost https://www.bluehost.in/hosting/vps 3659 INR/month 4 Core CPU 8 GB RAM 120 GB SSD 3 TB Bandwidth 2 IP Addresses FREE Yes(paid) FREE Domain for 1 Year, Microsoft Office Email - Free 30 Days
3 a2hosting[ Managed Hosting] https://www.a2hosting.com/vps-hosting/managed 6252 INR/month 6 Core CPU 8 GB RAM 250 GB SSD 3 TB Bandwidth 2 IP Addresses FREE Yes HTTP3
3 a2hosting[ unManaged Hosting] https://www.a2hosting.com/vps-hosting/unmanaged 6472 INR/month 6 Core CPU 16 GB RAM 250 GB SSD 3 TB Bandwidth 2 IP Addresses FREE Yes HTTP3
4 godaddy https://in.godaddy.com/hosting/ecommerce-hosting 4,499 INR/month 4 Core CPU 8 GB RAM 200 GB SSD unmetered bandwidth 1 Free Dedicated Ips (for first year) FREE (for first year) Yes(paid) LS Cache
5 inmotionhosting https://www.inmotionhosting.com/managed-vps-hosting $1,259.64 for 3 years Unmetered 6GB 150GB 5 TB Bandwidth 4 Dedicated IP's FREE Yes 5 free cPanels + WHM Free and unlimited email accounts Free SSL's