Skip to content

Instantly share code, notes, and snippets.

@swoboda
Created November 6, 2017 17:53
Show Gist options
  • Save swoboda/c1ce39044eaa03f0628c2332fa2cc56b to your computer and use it in GitHub Desktop.
Save swoboda/c1ce39044eaa03f0628c2332fa2cc56b to your computer and use it in GitHub Desktop.
Add "Free Shipping" text to WooCommerce cart page. Complete visual WooCommerce cart hooks guide: https://www.wpdesk.net/blog/woocommerce-cart-hooks/
<?php
// Do NOT include the opening php tag
add_action( 'woocommerce_before_cart_table', 'wpdesk_cart_free_shipping_text' );
/**
* Add "free shipping" text to WooCommerce cart page
*
*/
function wpdesk_cart_free_shipping_text() {
echo '<div class="woocommerce-info">Free Shipping available from $299!</div>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment