Created
July 20, 2015 17:38
-
-
Save omurphy27/d1331a48fc59b5d3cb1f to your computer and use it in GitHub Desktop.
Executing WooCommerce Action Hooks within a Conditional
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
// the priority (3rd parameter) must be lower than the action that is being removed | |
add_action('woocommerce_single_product_summary','jwd_remove_title',4); | |
function jwd_remove_title() { | |
// the conditional must be inside a function | |
if (is_single()) { | |
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title',5); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment