A list of all Woocommerce Javascript events and how to use them

Posted by Pockets Dev Team on Tuesday, September 3rd, 2024 - 6:48am

When you're working with WooCommerce, knowing how and when things happen on the frontend is huge. Luckily, WooCommerce triggers a ton of JavaScript events during the checkout process, cart updates, product pages, and more. These events are your way in — letting you hook into what WooCommerce is doing without touching its core code. Stuff like updating totals when a coupon is applied, reacting when a variation is selected, or doing something fancy when a payment method is picked — it’s all tied to events like update_checkout, found_variation, and payment_method_selected.

Catching these events is super simple. Most of the time, WooCommerce fires them on the body, so you just slap on a jQuery .on() listener. Something like $('body').on('update_checkout', function() { /* do your magic */ }); and you're in. Whether you want to tweak the cart page, enhance the checkout experience, or customize how adding to cart feels, these events give you a clean, flexible way to make WooCommerce behave exactly how you want — without hacking it apart.

Credit for this post goes to this stack overflow question

Woocommerce Checkout JS events

Woocommerce cart page JS events

Woocommerce Single product page JS events

Woocommerce Variable product page JS events

Woocommerce Add to cart JS events

Woocommerce Add payment method JS events

To bind listener to these events, use:

For example:

Related Posts

How to use grid to animate size transitions without setting dimensions Published Saturday March 7th, 2026 11:39am

This article discusses how CSS Grid can be used to smoothly animate size changes that normally can’t be animated in CSS, such as transitions between collapsed and expanded content. It explains how animating grid-template-rows or grid-template-columns with fr units allows elements to grow or shrink fluidly without relying on fixed heights or JavaScript.

How to stack elements without using position absolute Published Wednesday March 4th, 2026 12:03pm

This article discusses how to stack elements using grid, instead of using position absolute.

Using a Custom Element to create re-usable VUE apps Published Friday September 6th, 2024 5:56am

This article covers how to create a custom element that can be used to create VUE instances automatically when the element is in the DOM.