Last active
December 31, 2015 00:59
-
-
Save stephenscaff/7911451 to your computer and use it in GitHub Desktop.
Filter / function for the Woo Commerce plugin (wordpress). If no price is set, let's output a custom Call For Price (or whatevers). Goes in /woocommerce/woocommerce-hooks.php, but should also work out in your functions.php. Saw that a few peeps created plugins for this idea, but that's kinda retardery, since it's such a simple and tiny solution.
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
/* Call for price filter */ | |
add_filter('woocommerce_empty_price_html', 'custom_call_for_price'); | |
function custom_call_for_price() { | |
return 'Call for price: 1-800-your-mum'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment