Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/samirshah7/woocommerce-free-shipping-bar/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
A lightweight WooCommerce plugin that shows customers how much more they need to spend to unlock free shipping. It aims to raise average order value and reduce cart abandonment.
Features
- Progress bar on the cart page, checkout page and mini-cart
- Updates live through WooCommerce AJAX fragments (add to cart, quantity change)
- Admin settings page: WooCommerce > Free Shipping Bar (enable/disable, threshold amount)
- Accessible markup (
role="progressbar"with ARIA values) - Security: capability checks, sanitised settings, escaped output
- Translation-ready (
fsb-free-shipping-bartext domain)
Installation
- Download the zip and go to Plugins > Add New > Upload Plugin.
- Activate it (WooCommerce must be active).
- Open WooCommerce > Free Shipping Bar and set your threshold.
- Make sure your WooCommerce Free shipping method uses the same minimum amount.
How it works
- Reads
WC()->cart->get_displayed_subtotal()and compares it with the threshold. - Hooks used:
woocommerce_before_cart_table,woocommerce_before_checkout_form,woocommerce_widget_shopping_cart_before_buttons,woocommerce_add_to_cart_fragments. - Settings use the WordPress Settings API (
register_settingwith a sanitize callback).
Limitations / roadmap
- Targets the classic cart and checkout. Block-based Cart/Checkout needs a Store API extension (planned).
- Planned: custom message text, colour options, per-zone thresholds, shortcode.
Requirements
WordPress 6.0+, WooCommerce, PHP 7.4+
Author
Sameer Shah