Last active
November 2, 2021 16:33
-
-
Save NickGreen/abab8e5553a9a3a46c2ac34513b65f88 to your computer and use it in GitHub Desktop.
Add cart and checkout notices if total less than $25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_before_cart_table', 'free_shipping_notice' ); | |
add_action( 'woocommerce_checkout_before_customer_details', 'free_shipping_notice' ); | |
function free_shipping_notice() { | |
if ( 25 > WC()->cart->get_total() ) { | |
echo '<div style="color: #e08e79;">All orders over $25 ship free</div>'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment