If Free Shipping Bar: Amount Left for Free Shipping for WooCommerce shows on a classic cart page but not with the WooCommerce Cart block, Checkout block or Mini-Cart block, those blocks skip the classic hooks the plugin prints on. Add the [alg_wc_left_to_free_shipping] shortcode next to the block, or switch the page back to the classic cart.
Symptoms #
- The text or progress bar appears on a cart page built with the
[woocommerce_cart]shortcode, but not on a cart page that uses the Cart block. - Nothing appears on a Checkout block page even though the Checkout section is enabled.
- Nothing appears in a block theme’s Mini-Cart block or in a page builder’s cart widget.
Why it happens #
The Cart, Checkout and Mini-cart sections under WPFactory > Left for Free Shipping (also reachable at WooCommerce > Settings > Amount Left for Free Shipping) print the text on classic WooCommerce template hooks, for example woocommerce_after_cart_totals, woocommerce_checkout_after_order_review and woocommerce_after_mini_cart. The Cart, Checkout and Mini-Cart blocks are rendered with JavaScript and do not run those hooks, so there is nowhere for the text to go. Changing the Position setting does not help, because every position in the list is a classic hook.
Fix 1: Place the shortcode next to the block (free) #
- Edit your cart page in Pages.
- Add a Shortcode block above or below the Cart block and enter
[alg_wc_left_to_free_shipping]. - Update the page and check it with a product in the cart.
The shortcode shows the amount calculated when the page loads. The Cart block updates totals without the classic cart events, so the text may keep the old amount until the page reloads. With Enable AJAX (Pro, Advanced > AJAX Options) the shortcode refreshes on standard WooCommerce cart events; if your blocks do not fire them, the text still updates on reload. For shortcode attributes and the widget, see Free Shipping Shortcodes and Widget in WooCommerce.
Fix 2: Switch the page to the classic cart or checkout #
If you need the built-in positions, live updates on quantity changes and the in-table options, use the classic templates:
- Edit the cart page and replace the Cart block with a Shortcode block containing
[woocommerce_cart]. For checkout, use[woocommerce_checkout]in place of the Checkout block. - Update the page, then configure the Cart and Checkout sections as described in Display Free Shipping Info on the WooCommerce Cart Page and Display Free Shipping Info on the WooCommerce Checkout.
The Checkout and Mini-cart sections are Pro. The Cart section is free.
Fix 3: Mini-carts, widgets and page builders #
- Classic mini-cart widget: enable the Mini-cart section (Pro) and pick a Position such as After mini cart (default) or Before mini cart buttons. See Show Free Shipping Info in the WooCommerce Mini Cart.
- Mini-Cart block or a page builder cart: these usually skip the classic mini-cart hooks. Place the shortcode in a Shortcode or text widget near the cart instead, or use the Amount Left for Free Shipping widget. See Add the Amount Left for Free Shipping Widget.
- Site-wide banner: the Store notice section (Pro) shows the message on every page without depending on cart templates. See Default and Site-Wide Free Shipping Notices in WooCommerce.
Confirm the fix #
Open the cart page in a private window with a product in the cart. You should see the default text “[amount] left for free shipping”, or your custom content. If you see the raw shortcode text, check the spelling of [alg_wc_left_to_free_shipping] and that the plugin is active.
Need a hand? Our team answers every ticket on the Amount Left for Free Shipping support forum. Include your theme name and whether the cart page uses blocks.
