Better Usability for WooCommerce 1.2.1 has 17 actions and 57 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Better Usability for WooCommerce fires an action
add_action( 'wbu_checkout_quantity_updated', function( $cart_key, $qty ) {
// Your code runs here.
}, 10, 2 );
// Change a value Better Usability for WooCommerce is about to use
add_filter( 'wbu_cart_update_response', function( $resp, $cart_item_key ) {
// Change $resp here.
return $resp;
}, 10, 2 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filters the classic cart's AJAX refresh after a quantity change (wbulite.js * puts 'html' in .cart-collaterals, 'price' in the item's subtotal cell and * 'checkout_label' back on the Proceed to checkout button). */ apply_filters( 'wbu_cart_update_response', $resp, $cart_item_key ); -
/** * Fires after a quantity changed on the checkout page was saved, before the * totals are recalculated. */ do_action( 'wbu_checkout_quantity_updated', $cart_key, $qty ); -
/** * Filters where "Go to checkout directly instead of cart" sends the shopper * after an add to cart. */ apply_filters( 'wbu_direct_checkout_url', wc_get_checkout_url(), $url ); -
/** * Filters the JSON the Tools tab exports (e.g. to add an add-on's own * settings). */ apply_filters( 'wbu_export_settings_payload', $payload, $settings ); -
/** * Filters the low-stock badge's HTML (printed as it is: escape what you add). */ apply_filters( 'wbu_low_stock_badge_html', '<p class="wbu-low-stock" role="status">' . $message . '</p>', $product, $stock_qty, $threshold ); -
/** * Filters the notice shown when an add to cart goes past "Max product quantity * allowed". */ apply_filters( 'wbu_max_quantity_message', __('The maximum quantity that can be added for this product is:', 'woo-better-usability') . ' ' . $productMaxQty, $productMaxQty, $product_id, $newQuantity ); -
/** * Filters the largest quantity the quantity select offers — also the cap the * Cart/Checkout blocks' steppers get when a maximum quantity is set. */ apply_filters( 'wbu_select_max_quantity', $maxQty, $product ); -
/** * Fires after the Tools tab imported a settings file and saved it. */ do_action( 'wbu_settings_imported', $current, $imported, $decoded ); -
/** * End of wbu plugin overrides */ do_action( 'woocommerce_after_add_to_cart_button' ); -
do_action( 'woocommerce_after_quantity_input_field' ); -
do_action( 'woocommerce_before_quantity_input_field' ); -
apply_filters( 'mh_wbu_all_options', array() ); -
apply_filters( 'wbu_buy_now_button_html', $html, $product, 'product' ); -
apply_filters( 'wbu_override_review_order', false ); -
apply_filters( 'wbu_product_min_value', $minimum, $product ); -
apply_filters( "{$this->common->getPluginAbbrev()}_{$alias}", true ); -
do_action( "mh_{$this->pluginAbbrev}_admin_buttons" ); -
do_action( "mh_{$this->pluginAbbrev}_after_tab", $normalizedTab ); -
apply_filters( "mh_{$this->pluginAbbrev}_classic_only_note_shown", false, $normalizedTab ); -
do_action( "mh_{$this->pluginAbbrev}_extra_tabs", $this ); -
apply_filters( "mh_{$this->pluginAbbrev}_render_custom_tab", false, $tab ); -
apply_filters( "mh_{$this->pluginAbbrev}_saving_options", $opts ); -
apply_filters( "mh_{$this->pluginAbbrev}_settings", array() ); -
do_action( "mh_{$this->pluginAbbrev}_trigger_save", $btnClick ); -
apply_filters( 'mh_wbu_setting_value', $name ); -
apply_filters( 'mh_wbu_settings', array() ); -
apply_filters( 'wbu_after_check_quantity_input', $allowChangeQty, $product ); -
apply_filters( 'wbu_ajax_add_to_cart_legacy', false ); -
apply_filters( 'wbu_block_cart_confirm_js_uri', plugins_url('assets/blocks/wbu-block-cart-confirm.js', WBU_ROOT_FILE) ); -
apply_filters( 'wbu_block_direct_checkout_js_uri', plugins_url('assets/blocks/wbu-block-direct-checkout.js', WBU_ROOT_FILE) ); -
apply_filters( 'wbu_blocks_qty_step', $step, $product ); -
apply_filters( 'wbu_buy_now_redirect_url', wc_get_checkout_url(), $url ); -
apply_filters( 'wbu_bypass_shop_quantity_override', false ); -
apply_filters( 'wbu_cart_enable_qtybuttons', true ); -
apply_filters( 'wbu_checkout_quantity_input', woocommerce_quantity_input(array( 'input_name' => "cart[{$cart_item_key}][qty]", 'input_value' => (int) $cart_item['quantity'], 'max_value' => ( $product->backorders_allowed() ? '' : $product->get_stock_quantity() ), 'min_value' => '1' ), $product, false ) ); -
apply_filters( 'wbu_css_uri', plugins_url('assets/wbulite.css', WBU_ROOT_FILE) ); -
apply_filters( 'wbu_enable_ajax_add_to_cart', true ); -
apply_filters( 'wbu_enable_qtybuttons', true ); -
apply_filters( 'wbu_enable_quantity_input', true ); -
apply_filters( 'wbu_fix_cart_enter_key', false ); -
apply_filters( 'wbu_frontend_vars', $vars, $all_options ); -
apply_filters( 'wbu_get_template', $path, $name ); -
apply_filters( 'wbu_is_shop_loop', false ); -
apply_filters( 'wbu_js_uri', plugins_url('assets/wbulite.js', WBU_ROOT_FILE) ); -
apply_filters( 'wbu_low_stock_threshold', get_option('woocommerce_notify_low_stock_amount', 2), $product ); -
apply_filters( 'wbu_product_quantity_input', $qtyInput ); -
apply_filters( 'wbu_qty_when_sold_individually', true ); -
apply_filters( 'wbu_qtybtn_minus', wbu()->qty_button_html('sub') ); -
apply_filters( 'wbu_qtybtn_plus', wbu()->qty_button_html('inc') ); -
apply_filters( 'wbu_shop_enable_qtybuttons', true ); -
apply_filters( 'wbu_shop_quantity_area_args', array( 'product' => $product, 'quantityField' => $quantityField, 'initialQuantity' => $this->get_initial_quantity($product), 'class' => 'button alt ajax_add_to_cart add_to_cart_button product_type_simple single_add_to_cart_button', ) ); -
apply_filters( 'wbu_shop_quantity_value', 1, $product ); -
do_action( 'woocommerce_after_add_to_cart_form' ); -
do_action( 'woocommerce_after_add_to_cart_quantity' ); -
do_action( 'woocommerce_after_cart' ); -
do_action( 'woocommerce_after_cart_table' ); -
do_action( 'woocommerce_before_add_to_cart_button' ); -
do_action( 'woocommerce_before_add_to_cart_form' ); -
do_action( 'woocommerce_before_add_to_cart_quantity' ); -
do_action( 'woocommerce_cart_collaterals' ); -
apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $qty), $cart_item, $cart_item_key ); -
apply_filters( 'woocommerce_quantity_input_args', array(), $product ); -
apply_filters( 'woocommerce_quantity_input_max', $maxValue, $product ); -
apply_filters( 'woocommerce_quantity_input_min', $minValue, $product ); -
apply_filters( 'woocommerce_quantity_input_step', 1, $product );
Generated from Better Usability for WooCommerce's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: