Last active
October 17, 2015 05:15
-
-
Save levantoan/dee7d56a9548d180c96e to your computer and use it in GitHub Desktop.
Hides the 'Free!' price notice woocomerce
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 | |
//Remove (Free) label on cart page for "Shipping and Handling" if cost is $0 | |
function sv_change_cart_shipping_free_label( $label ) { | |
$label = str_replace( "(Free)", " ", $label ); | |
return $label; | |
} | |
add_filter( 'woocommerce_cart_shipping_method_full_label' , 'sv_change_cart_shipping_free_label' ); |
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 | |
/** | |
* Hides the 'Free!' price notice | |
*/ | |
add_filter( 'woocommerce_variable_free_price_html', 'hide_free_price_notice' ); | |
add_filter( 'woocommerce_free_price_html', 'hide_free_price_notice' ); | |
add_filter( 'woocommerce_variation_free_price_html', 'hide_free_price_notice' ); | |
function hide_free_price_notice( $price ) { | |
return ''; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment