Created
February 21, 2017 08:54
-
-
Save kreamweb/2cd2bb2ce755fe63bf29f2d6b2a0de15 to your computer and use it in GitHub Desktop.
function that hide the popup in a specific category
function that changes a popup in a specific category
This file contains hidden or 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( 'template_redirect', 'ywpop_hide_popup', 9); | |
| function ywpop_hide_popup(){ | |
| if( is_product_category() ){ | |
| add_filter( 'enable_yit_popup', '__return_false'); | |
| } | |
| } | |
| add_action( 'template_redirect', 'ywpop_change_popup', 9); | |
| function ywpop_change_popup(){ | |
| if( is_product_category('music') ){ | |
| add_filter( 'ypop_current_popup', function( $id ) { return 102; } ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment