To control when the free shipping message shows and make it update without a page reload, open WPFactory > Left for Free Shipping > Advanced in Free Shipping Bar: Amount Left for Free Shipping for WooCommerce. The behavior toggles there are free; the AJAX group and the option to ignore virtual products in the total are Pro.
Go to WPFactory > Left for Free Shipping (also reachable at WooCommerce > Settings > Amount Left for Free Shipping) and open the Advanced section.
Advanced options #
| Label | Option ID | Default | Free/Pro |
|---|---|---|---|
| Check shipping cost (show message when shipping total is zero) | alg_wc_left_to_free_check_cart_free_shipping |
No | Free |
| Check for alternative free shipping | alg_wc_left_to_free_shipping_check_free_shipping |
No | Free |
| Virtual products (hide text for virtual-only carts) | alg_wc_left_to_free_shipping_check_virtual |
No | Free |
| Ignore virtual products in cart to reach the min amount | alg_wc_left_to_free_shipping_ignore_virtual_products |
No | Pro |
| Clear notices (wipe notices on add to cart) | alg_wc_left_to_free_shipping_clear_notices |
No | Free |
What each option is for #
- Check shipping cost: shows the Free shipping reached message whenever the cart’s shipping total is 0 and a shipping rate is available, for example when a free shipping coupon or a zero-cost rate applies.
- Check for alternative free shipping: if the zone also has a Free shipping method that needs no minimum, the cart is treated as already qualifying.
- Virtual products: hides the message when every item in the cart is virtual, since nothing ships.
- Ignore virtual products in cart to reach the min amount (Pro): subtracts virtual items from the cart total, and makes the WooCommerce Free shipping method ignore them too, so downloads or services cannot unlock free delivery.
- Clear notices: removes earlier notices when a product is added. Turn it on if messages appear twice.
AJAX options (Pro) #
Enable AJAX so the amount updates without a page reload. This matters for the Store notice, for WooCommerce’s “Enable AJAX add to cart buttons on archives”, and for text placed outside the areas WooCommerce refreshes itself.
| Label | Option ID | Default |
|---|---|---|
| Enable AJAX | alg_wc_left_to_free_shipping_ajax_enabled |
No |
| Additional events | alg_wc_left_to_free_shipping_ajax_events |
(empty) |
| Added to cart event without AJAX | alg_wc_left_to_free_shipping_ajax_added_to_cart_no_ajax |
No |
| Force update (update on any page load) | alg_wc_left_to_free_shipping_ajax_force_update |
No |
The plugin always listens for a core set of events: updated_cart_totals, added_to_cart, removed_from_cart, wc_fragment_refresh, updated_checkout, wc_cart_emptied, updated_shipping_method, and a built-in event fired when a Cart or Checkout block total changes. Use Additional events only to add your own space-separated JavaScript events. Enable Force update if a caching layer stops the amount from refreshing.
What AJAX refreshes #
With Enable AJAX on, three outputs refresh live: the [alg_wc_left_to_free_shipping] shortcode, the Site-wide notice and the Default WooCommerce notice from the Store notice section. The Cart, Mini-cart and Checkout sections and the widget are not refreshed by it: they update when WooCommerce redraws that part of the page, or on the next page load.
Step by step: live updates on shop and product pages #
- Place the shortcode where you want the message, for example in a header block:
[alg_wc_left_to_free_shipping content="%amount_left_for_free_shipping% left for free shipping"]. - In Advanced, tick Enable AJAX.
- If your theme adds to cart on single product pages with a page reload, also tick Added to cart event without AJAX.
- If you use page caching, tick Force update.
- Save changes, clear your cache and test by adding a product from the shop page.
If it does not work #
- The shortcode still shows the old amount: AJAX is off, or a cached page is served. Tick Force update and purge the cache. See Shortcode does not update on shop or product pages.
- Cart page text lags behind quantity changes: move it to a position inside the cart totals, which WooCommerce redraws. See Bar text does not update when the cart changes.
- A theme’s custom cart does not trigger updates: find the JavaScript event it fires after adding to cart and add it to Additional events.
FAQ #
Is AJAX updating free? #
No, Enable AJAX is Pro. The other Advanced toggles, except ignoring virtual products in the total, are free.
Does Force update slow the site? #
It sends one extra request per message on each page load, so enable it only when caching causes stale amounts.
Why is the message hidden for a cart with only downloads? #
The Virtual products option is on, which hides the text when nothing in the cart needs shipping.
Get more control #
The behavior toggles are free. Amount Left for Free Shipping Pro adds the AJAX engine and the virtual-products exclusion for accurate real-time updates. See what Pro unlocks.
Need a hand? Our team answers every ticket on the Amount Left for Free Shipping support forum.
