Many stores have free shipping limit which gives free shipping to the customer when the cart subtotal exceeds certain amount. Free shipping limit is a great way to increase average order value. For example, if average order value is $ 75, you can try to set free shipping limit to $ 100 to increase AOV.
However, usually free shipping limit is not communicated clearly. If it’s only mentioned on the front page or in the terms and conditions, it’s likely the customer won’t see it in the first place.
Fortunately it’s easy to add “Add $ X to cart and get free shipping” message to the checkout with simple code. Here’s an example of the end result:
Example
Code
The code below adds the notice to the checkout. You can add the code with Code Snippets (recommended) or to functions.php file in the theme. You can change the limit on the line 9, by default it’s $ 50.
<?php
/**
* Show free shipping limit notice on the checkout
*/
add_action( 'woocommerce_before_checkout_form_cart_notices', 'snippet_add_checkout_notice', 10, 0 );
function snippet_add_checkout_notice() {
if ( is_checkout() && WC()->cart ) {
$total = WC()->cart->get_cart_contents_total(); // Get cart subtotal after discounts
$limit = 50.00; // Free shipping limit, change if necessary
// If subtotal is less than limit, show notice
if ( $total < $limit ) {
// Calculate difference
$diff = $limit - $total;
$diff_formatted = wc_price( $diff );
// Display notice
wc_add_notice( sprintf( "Add %s to cart and get free shipping!", $diff_formatted ), 'notice' );
}
}
}