Better Usability for WooCommerce

By moiseh

★ 4.9/5 (21 ratings)700+ active installationsVersion 1.2.1

Buy now button, a shorter checkout, quantity −/+ buttons and AJAX cart updates for WooCommerce — fewer clicks from product to order.

Description

Better Usability for WooCommerce removes the small but persistent friction points that cause shoppers to abandon: waiting for full page reloads, hunting for quantity controls, a cart step they did not need and checkout fields nobody fills in. A Buy now button takes a shopper from the product straight to the checkout, the checkout asks only what your store needs, and quantities can be changed — and items removed — right on the checkout page, free. It covers five areas — Shop, Product, Cart, Checkout and the whole store — with settings you can mix and match to fit your store.


Free features:

Cart

  • Auto-refresh cart totals via AJAX when quantity changes — no “Update cart” click required
  • Show a confirmation prompt before quantity is reduced to zero
  • Hide the “Update cart” button

Checkout

  • Edit the order right on the checkout: change quantities and remove items without going back to the cart (classic checkout)
  • Take the fields your store does not need out of the checkout — Company, Address line 2, Phone, Order notes (classic checkout and Checkout block)
  • Hide the coupon form on the checkout; it stays on the cart (classic checkout and Checkout block)
  • Do not ask for the billing address when every product in the order is virtual — name and e-mail are enough (classic checkout)
  • Display the unit price next to each product name

Shop

  • Change product quantity directly on the shop/archive page before adding to cart
  • AJAX “Add to cart” on individual product pages (same as the shop-loop behaviour)
  • Skip the cart page and go straight to checkout after adding a product
  • Customise the “Add to cart” and “View cart” button labels

Product

  • “Buy now” button beside “Add to cart”, on the product page (simple and variable products) and in the shop (simple products): it adds the product and takes the shopper straight to the checkout — optionally with only that product in the cart; its text is yours
  • Low-stock urgency badge (“Only 3 left in stock!”) near the Add to Cart button on both single product and shop/archive pages — it reads WooCommerce’s own per-product stock quantity and low-stock threshold, shows only for stock-managed products at or below that threshold, and is fully customisable (badge text with a {stock} placeholder, optional custom threshold), giving hesitant shoppers a scarcity nudge with zero configuration beyond a toggle

General

  • Show −/+ buttons around the quantity field — choose where: Shop, Product page, Cart, Checkout
  • Show the quantity as a dropdown select instead of a numeric input — choose where: Shop, Product page, Cart, Checkout
  • Lock the numeric input so shoppers can only use the +/− buttons (prevents accidental typing)
  • One “Updating…” text for the cart and price refreshes
  • Convert simple-product “Add to Cart” buttons to AJAX site-wide
  • “Added ✓” on the button and a small “Added to your cart” notice with a link to the cart, after an AJAX add to cart (its text is yours)
  • Hide the “Added to cart” notice after adding a product
  • Hide the “View cart” link after adding a product
  • Set a global maximum quantity per product
  • Decimal quantity support for +/− buttons
  • Accessible, WCAG-friendly quantity controls — the −/+ buttons carry proper “Decrease quantity” / “Increase quantity” labels, work with the keyboard (Enter/Space), and announce the new quantity (and the cart refresh) to screen readers

PRO features:

  • Variation swatches — each option of a variable product as a colour dot, the variation’s own picture or a button instead of a drop-down, on the product page and in the shop; the colour is set on the attribute’s term (Products > Attributes); options with no variation left are greyed out (view demo)
  • Sale countdown — “Sale ends in 2d 05:14:09” under the price, on the product page and in the shop, counting down to the end date of the sale you scheduled on the product (never a made-up deadline); shown only when the sale ends within the days you choose (view demo)
  • Sticky Add to Cart bar — a floating bar slides in when the shopper scrolls past the Add to Cart button, keeping purchase intent alive without hunting for the button; on phones, computers or both, with a variable product’s options and the Buy now button in the bar (view demo)
  • Quick View modal — shoppers open a full product preview in a lightbox (image, price, description, Add to Cart) without leaving the Shop page; keyboard accessible (focus stays in the lightbox and returns to the button on close) (view demo)
  • Synchronize cart quantities automatically when changed (view demo)
  • Auto-update price on Product and Shop pages as quantity changes (view demo)
  • Change product variations directly on the Shop page — fewer clicks to buy (view demo)
  • Sync the MiniCart widget live from Shop or Product pages (view demo)
  • AJAX delete on the checkout page — no full page reload (view demo)
  • Change quantities inside the Mini-Cart widget, with −/+ buttons (view demo)

Get the PRO version here.

Developer hooks

Filters and actions for theme and plugin developers (in your theme’s functions.php or a small plugin):

  • wbu_select_max_quantity (filter) — the largest quantity the quantity select offers, also the Cart/Checkout blocks’ cap when a maximum is set; args: $max, $product
  • wbu_max_quantity_message (filter) — the notice when an add to cart goes past “Max product quantity allowed”; args: $message, $max, $product_id, $new_quantity
  • wbu_low_stock_badge_html (filter) — the low-stock badge’s HTML; args: $html, $product, $stock, $threshold
  • wbu_direct_checkout_url (filter) — where “Go to checkout directly” sends the shopper; args: $checkout_url, $url
  • wbu_cart_update_response (filter) — the classic cart’s AJAX refresh after a quantity change; args: $response, $cart_item_key
  • wbu_checkout_quantity_updated (action) — a quantity changed on the checkout page was saved; args: $cart_item_key, $quantity
  • wbu_export_settings_payload (filter) and wbu_settings_imported (action) — the Tools tab’s settings export and import
  • wbu_get_template (filter) — a template’s path, to use your own copy; args: $path, $name
  • wbu_buy_now_button_html (filter) — the “Buy now” button’s HTML; args: $html, $product, $place (product or shop)
  • wbu_buy_now_redirect_url (filter) — where “Buy now” sends the shopper; args: $checkout_url, $url
  • Also: wbu_is_shop_loop, wbu_enable_quantity_input, wbu_enable_qtybuttons, wbu_qtybtn_minus / wbu_qtybtn_plus, wbu_shop_quantity_value, wbu_low_stock_threshold, wbu_frontend_vars (the settings the scripts get) and mh_wbu_settings (the settings and their defaults)

Installation

  1. Upload woo-better-usability.zip to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. It’s done. Now you can go to the Settings to customize what you want

FAQ

Does it work with my theme?

The plugin hooks into standard WooCommerce actions and filters, so it works with the vast majority of themes out of the box. It has been specifically tested and patched for popular themes including Astra, Divi, Flatsome, Saasland, Enfold, and Greenmart. If you run into a visual glitch, try changing where the −/+ buttons show (“Show -/+ buttons around the quantity on”, General tab), or open a support thread with your theme name.

Does it work with Elementor (and other page builders)?

Yes. Compatibility patches for Elementor (including its WooCommerce widgets and minicart) are built in and have been maintained across many releases. Divi and similar builders are also supported.

Does it work with the new WooCommerce Cart and Checkout Blocks?

Partly. The global maximum quantity per product and the sold-individually / lock quantity input limits are now enforced inside the Block Cart and Block Checkout too — the block quantity steppers read these limits from the WooCommerce Store API, so they are respected regardless of whether you use the classic or Block Cart/Checkout. The confirm before removing an item prompt (also fired when the minus stepper would drop quantity to zero) works inside the Block Cart as well. The remaining Cart/Checkout tweaks (AJAX quantity change, delete from checkout, and similar) still target the classic (shortcode-based) Cart and Checkout templates and do not apply inside the Blocks — when your Cart/Checkout pages use the Blocks, the settings page hides them. The shop and product page features work regardless.

Is it compatible with WooCommerce High-Performance Order Storage (HPOS)?

Yes. HPOS compatibility has been declared since version 1.0.55.

What is the difference between the free and PRO versions?

The free version covers the buying path itself: the “Buy now” button, a shorter checkout (fields, coupon, address of virtual orders), editing the order on the checkout, AJAX cart updates, the −/+ quantity buttons and the shop/product/checkout tweaks. The PRO version adds variation swatches, a sale countdown, the sticky Add to Cart bar (with the options and Buy now), the Quick View modal, inline variations on the shop page, and real-time synchronisation of the cart, the Mini-Cart (with its own −/+ buttons) and the prices, without a page reload.

Does the “Buy now” button replace “Add to cart”?

No — it sits beside it. “Add to cart” keeps adding to the cart; “Buy now” adds the product and opens the checkout. To turn every “Add to cart” into a shortcut to the checkout instead, use “Go to checkout directly instead of cart” (Shop tab).

The AJAX cart update is not working. What should I check?

  1. Make sure “Update cart/prices automatically when change quantity” is on (WooCommerce → Better Usability → Cart) and your Cart page uses the classic [woocommerce_cart] shortcode — the Cart block updates its totals on its own.
  2. Open your browser’s developer console (F12) and check for JavaScript errors — a conflicting plugin or theme script is the most common cause.
  3. Make sure no caching plugin is serving a stale version of the page. Purge all caches after changing settings.

Screenshots

Changelog

1.2.1

  • Tested with WooCommerce 11.3 and WordPress 7.1

1.2.0

  • Changed: a tidier settings page — a long setting’s label sits on its own line over its field (it ran to four lines in the label column), and a group with one long label shows all its labels that way
  • New: a “Buy now” button beside “Add to cart” — on the product page (simple and variable products) and in the shop (simple products, also in the block themes’ product lists): it adds the product and goes straight to the checkout, with the quantity chosen; “Buy only that product” empties the cart first (Product tab)
  • New: a shorter checkout (new Checkout tab) — take Company, Address line 2, Phone and Order notes out of it, hide its coupon form (both in the classic checkout and the Checkout block), and do not ask for the billing address when every product in the order is virtual (classic checkout)
  • New: “Added ✓” on the button and a small “Added to your cart” notice with a link to the cart (or the checkout) after an AJAX add to cart
  • Changed: the quantity as a drop-down select on the checkout is now part of the free plugin (it was a PRO option)
  • Changed: the checkout settings moved from the General tab to the new Checkout tab (your saved settings are kept)
  • New: developer hooks wbu_buy_now_button_html and wbu_buy_now_redirect_url

1.1.3

  • New: developer hooks — the filters wbu_select_max_quantity, wbu_max_quantity_message, wbu_low_stock_badge_html, wbu_direct_checkout_url, wbu_cart_update_response and wbu_export_settings_payload, the actions wbu_checkout_quantity_updated and wbu_settings_imported, and wbu_get_template now also gets the template’s name (listed under “Developer hooks”)
  • Fixed: a request queued while another was still on its way (the quantity and price updates) sent that other one a second time — each is now sent once, in order
  • Fixed: after an AJAX product filter (BeRocket) the quantity listener of the add to cart buttons was bound once more each time
  • Fixed: an AJAX action pointed at a function that does not exist (wbu_dismissed_notice_handler) — a request to it ended in a PHP fatal error; it is gone
  • Removed: the Porto theme compatibility code (a script that checked the Mini-Cart every 100 ms for duplicated −/+ buttons, and dropped a second quantity field in its shop) — the theme is no longer supported
  • Hardened: the scripts’ old code tidied, doing the same as before — no jQuery calls deprecated in jQuery 3 (.change(), :first), no stray global variables, dead code removed (two empty handlers on the shop page, a second “hide Update cart” for Avada, an unused empty admin-settings.min.js); the settings migration runs once per request (plugins_loaded), no longer a second time on admin_init

1.1.2

  • Hardened: WordPress.org Plugin Check warnings — the settings save checks its nonce itself too, sanitized input (the quantity posted on the product page), the plugin’s own hooks, functions and constants marked as its own (they keep their “wbu” names, so code that uses them keeps working); WordPress.org loads the plugin’s translations by itself (no load_plugin_textdomain() call)

1.1.1

  • Fixed: the “Get PRO” links open the PRO’s Gumroad page directly (gum.co/wbupro) instead of going through an old redirect

1.1.0

  • Changed: a cleaner Get PRO tab — the PRO features one per row with a check, a red YouTube “Watch demo” button for each feature video, and the buy button at the top and the bottom
  • Fixed: the Get PRO tab listed no feature (the readme’s “PRO features:” heading was not read)
  • Fixed: a settings tab whose name has a space opened empty
  • Changed: fewer, simpler settings. The per-page settings are merged into one each, on the General tab: “Show -/+ buttons around the quantity on” (Shop, Product page, Cart, Checkout — replaces “Display quantity buttons everywhere” and the four “Show -/+ buttons around item quantity”), “Show the quantity as a select (drop-down) on” (Shop, Product page, Cart — replaces the three “Show quantity as select instead of numeric field”), “Lock the quantity input” (was on the Cart tab), and “Text shown while the cart or a price is updating” (replaces “Text to display in Update cart button while loading”)
  • Removed settings, now fixed: “AJAX timeout in milliseconds” (always 800 ms), “Technical method to update cart prices” (always the plugin’s own AJAX) and “Where to display the Updating text” (always the Proceed to checkout button)
  • Removed features: “Override the default number of products per row”, “Hide product pagination”, “Hide Default sorting select box”, “Hide Add to cart button” (shop), “Hide price range for variable products”, “Hide price range for grouped products”, “Hide quantity input on product page”, “Hide quantity input on cart page” and the free-shipping progress bar (“Show a free-shipping progress bar”) — a free-shipping bar is in Ajax Cart for WooCommerce PRO
  • Changed: when your Cart/Checkout pages use the WooCommerce blocks, the settings that only work on the classic Cart/Checkout are hidden (their saved values are kept), with a note saying so
  • Your saved settings are migrated on update: each merged setting gets every page where the old one was on, the removed settings are dropped; a settings file exported from an older version imports the same way (Tools tab)
  • Changed: a cleaner settings page — the settings in a card, one row each with the label and its field aligned, on/off settings as switches, multiple choices as chips, a setting’s sub-options in a panel under it, and Reset set apart from Save

1.0.66

  • Changed: the settings page’s script variable, nonces and notice links now carry the plugin’s own prefix; “Tested up to” is declared only in readme.txt
  • Hardened: every piece of HTML the plugin prints (quantity fields, -/+ buttons, add-to-cart links) goes through WordPress’s escaping, and no PHP file can be opened directly
  • Changed: scripts and styles carry the plugin version, so browsers fetch the new ones after an update

1.0.65

  • Fixed: with another of our plugins on the same site, the two no longer share — and override — each other’s settings, notices and update code

1.0.64

  • Tested with WordPress 7.1 and WooCommerce 11.2 (on PHP 8.4): no changes needed

1.0.63

  • Added an optional low-stock urgency badge (“Only {stock} left in stock!”) near the Add to Cart button on both the single product page (woocommerce_single_product_summary) and the shop/archive loop (woocommerce_after_shop_loop_item). It renders only for stock-managed products whose remaining quantity is at or below the threshold — the configured value when set, otherwise WooCommerce’s own woocommerce_notify_low_stock_amount (overridable via the wbu_low_stock_threshold filter) — swaps {stock} for the remaining quantity, and is output as a role="status" region so screen readers announce it. Enable it and customise the text/threshold under the Product tab
  • Added a free-shipping progress bar to the classic Cart and the Mini-Cart — a live “Add $X more to get FREE shipping!” message with a progress bar that reads your store’s own free-shipping threshold (the min_amount of the Free shipping method on the matching shipping zone, coupon-only rules excluded, overridable via the wbu_free_shipping_threshold filter), swaps {remaining} for the amount still needed, and shows an “unlocked” message at 100%; it refreshes automatically as quantities change on the cart and rides WooCommerce’s fragment refresh in the Mini-Cart. Enable it and customise both messages under the Cart tab
  • The −/+ quantity buttons are now accessible everywhere they appear (shop, product, cart, checkout, mini-cart and the PRO Quick View modal): each button exposes a real “Decrease quantity” / “Increase quantity” label to screen readers instead of a bare “-” / “+” glyph, and can be operated with the keyboard using Enter or Space
  • The new quantity is now announced to screen readers after each −/+ click (e.g. “Quantity: 3”), and “Cart total updated” is announced once the AJAX cart/checkout refresh finishes, through a single visually-hidden aria-live region
  • Made the free-shipping progress bar accessible: the track is now a real role="progressbar" control (with aria-valuemin/valuemax/valuenow and a plaintext aria-label), and its state is announced to screen readers through the shared aria-live region whenever it changes on a cart refresh (classic Cart or Mini-Cart) — so shoppers hear “Add $X more to get FREE shipping!” and the “You’ve unlocked free shipping!” unlock is spoken exactly once
  • When “lock the quantity input” is enabled, the input is now marked as read-only for assistive tech (aria-readonly) while staying focusable, so the current quantity can still be read out

1.0.62

  • The Block Cart and Block Checkout quantity steppers now increment/decrement by each product’s own configured step (e.g. 0.5 kg for weight-based products or multiples of 6 for “sold in packs” products), matching the classic Cart and preventing invalid quantities that trigger Store API validation errors at checkout
  • The “show a confirmation prompt before an item’s quantity is reduced to zero” safety feature now also works inside the WooCommerce Block Cart — a stray click on the remove link (or the minus stepper at quantity 1) asks “are you sure?” before the item is removed, matching the classic Cart behaviour
  • The “Go to checkout directly instead of cart” shortcut now also works on block-based shops (Product Collection / All Products) — adding a product from a shop, product or product-grid block sends the shopper straight to checkout, matching the classic behaviour that only fired on the old add-to-cart request

1.0.61

  • The global maximum-quantity-per-product limit and the sold-individually / “lock quantity input” rule are now enforced inside the WooCommerce Block Cart and Block Checkout (their quantity steppers read the limits from the Store API); the remaining classic-only tweaks still target the shortcode-based Cart/Checkout pages

1.0.60

  • Fixed the “Better Usability for WooCommerce may not be compatible with the Checkout block” admin notice — the plugin now declares compatibility with the Cart/Checkout Blocks (its features no-op inside the Blocks rather than breaking them)

1.0.59

  • PRO: Added Sticky Add to Cart bar — floats in when the shopper scrolls past the Add to Cart button on product pages; position, background colour, and text colour are all configurable
  • PRO: Added Quick View modal — opens a product preview lightbox from the Shop page without a page navigation

1.0.58

  • Fixed quantity selector always sending 1 when using the [add_to_cart] shortcode — add-to-cart button is a sibling of the qty form, not a child, so data-quantity was never updated
  • Fixed compat scripts reporting missing dependencies by moving enqueue hook to a later priority so third-party scripts are registered first
  • Fixed checkout slowdown caused by Ajax Search compat script binding an expensive DOMSubtreeModified listener — replaced with MutationObserver and excluded the script from checkout pages

1.0.57

  • Declared the GPLv2 license in the plugin header
  • Fixed the Author URI
  • Hardened the AJAX cart and checkout handlers with nonce verification and input sanitization
  • Escaped all dynamic output and corrected the text domain on every translatable string

1.0.56

  • Tested with WordPress 7.0 and WooCommerce 10.8
  • Declared Cart & Checkout Blocks compatibility status (features target the classic Cart/Checkout)
  • Added Requires PHP and Requires Plugins headers
  • Fixed a fatal error on the frontend when checking for the WooCommerce Min/Max Quantities plugin
  • Added missing exit after dismissing an admin notice redirect

1.0.55

  • Added High-Performance order storage compatibility

1.0.54

  • Tested with WooCommerce 7.0.1 and WordPress 6.1

1.0.53

  • Changed the shop quantity area and Add to cart button to be more template-standard

1.0.52

  • Fixed buttons and shop quantity issues for Flatsome theme

1.0.51

  • Adding better quantity buttons compatibility with ShopEngine + Elementor
  • Tested with WordPress 5.9 and WooCommerce 6.2.0

1.0.50

  • Reducing the templating overrides to make the AJAX add to cart features
  • Increasing compatibility with WooCommerce and plugins
  • Changed default plus and minus buttons looking
  • Tested with WC 5.8.1

1.0.49

  • Added a span with named class product_name to product title at checkout page
  • Fixed block and unblock effect functions to avoid edge cases errors
  • Tested with WC 5.5.1 and WP 5.8

1.0.48

  • Fixed WooCommerce 5.2 checkout quantity and remove button incompatibilities
  • Adding wbu_ajax_add_to_cart_legacy filter to use AJAX Add to cart buttons in more compatible way

1.0.47

  • Added single_add_to_cart_button class for Add cart buttons in Shop
  • Added BlockUI loading effect on Checkout table when changing quantity
  • Allow to reduce quantity with minus button when preloaded exceeding the max limit
  • Improved quantity buttons support
  • Updated Tested up to tag

1.0.46

  • When product is sold individually, disable quantity buttons in single product page
  • Fixed some WooCommerce frontend event listeners

1.0.45

  • Using document instead document.body listeners that was causing issues with some themes
  • Fix incorrect translation domain for specific config
  • Compatibility with Saasland theme buttons
  • Define more global quantity event listener for different cart theme layouts
  • Fixed missing hook call to display -/+ buttons in single product page when using selects
  • Added option: Display quantity buttons everywhere, simplified buttons display config

1.0.44

  • Cleaning unused source code
  • Changed plus and minus buttons display to be more standard (using woo *_quantity_input_field hooks)
  • Removing Fix layout break when Enter key is pressed config to use wbu_fix_cart_enter_key filter instead

1.0.43

  • Fixing bug in lib that was displaying unwanted admin notices
  • Updated WooCommerce tested tag

1.0.42

  • Fixed text domain to allow plugin string translation
  • Reduced and removed unnecessary frontend variables to reduce page size load
  • Removing minified asset wbulite.min.js for better coding standards and debug

1.0.41

  • Fixed flatsome duplicating add to cart section issue in shop page
  • Updated WooCommerce and WordPress tested tag

1.0.40

  • Removing deprecated PHP short_open_tag blocks
  • Supporting for decimal quantity increment and decrement buttons

1.0.39

  • Optimized Hide View cart link after add product config to not blink after add
  • Added per product limit compatibility with BeRocket Min and Max Quantity for WooCommerce plugin

1.0.38

  • Reversed changelog ordering to make it more standard
  • Changed plugin notices to respect the guidelines
  • Standardization of custom plugin templates overriding in theme
  • Added filter wbu_bypass_shop_quantity_override to avoid templae override quantity html area in Shop
  • Fixed View cart link after add product option to work with Greenmart theme

1.0.37

  • Added custom theme template overriding similar to WooCommerce
  • Removed listener for minus and plus buttons because it causing trouble with many themes

1.0.36

  • Fixed Divi theme child compatibility in increase/decrease buttons
  • Fixed Porto theme issues with duplicated quantity buttons
  • Prevent page reload in specific cases after change quantity in shop
  • Added listener for minus and plus buttons used in most themes
  • Compatibility with BeRocket Ajax Products Filter plugin
  • Avoid double quantity increment when using Astra theme
  • Refresh minicart totals when change quantity in checkout

1.0.35

  • Fixed divi theme child quantity on shop display
  • Added wp 5.4 tested up to tag
  • The option to transform Add to Cart into AJAX in Product is now generic for all pages

1.0.34

  • Added compatibility support with WooCommerce 4.0.1

1.0.33

  • Respect max stock quantities when using select input for quantities
  • Fixed bug that not displaying select input in Cart in some conditions

1.0.32

  • Fixed checkout max input quantity validation

1.0.31

  • Added compatibility support with WooCommerce 3.8.1
  • Fixed Undefined Index error in Shop page

1.0.30

  • Added support for modified remove link zero quantity check
  • Added support for Woo Gutenberg Products Block plugin

1.0.29

  • Updated WC tested up to tag

1.0.28

  • Removing -/+ buttons when product is sold individually

1.0.27

  • Fixed blockUI to hide when finish Custom AJAX callback
  • Added AJAX timeout for quantity change refresh
  • Updated WC tested up to tag

1.0.26

  • Changed the cart overlay behavior in Custom AJAX mode to use the default of WooCommerce

1.0.25

  • Fix and optimize some mess in JS code and removing loops
  • Fix issue in Related products not showing quantity input for first product

1.0.24

  • Enqueue assets in all pages for better compatibility with custom pages
  • Reduced is shop loop detection checks to better compatibility with Elementor and relateds
  • Added overlay when AJAX refreshing cart using Run Custom AJAX method
  • Removed option Don't apply this option to front page (use wbu_enable_quantity_input filter instead)
  • Removed option Always enqueue assets for better compatibility
  • Removed option Optimize to make Cart work better when embebed in other pages