Created
March 16, 2015 07:35
-
-
Save SirDarcanos/7a14ec9c9140dfc169dd to your computer and use it in GitHub Desktop.
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
$product_tags = wp_get_post_terms( $product->id, 'product_tag' ); | |
if ( ! empty( $product_tags ) ) { | |
foreach( $product_tags as $tag ) { | |
if ( $tag->slug === 'tag-slug' && ! is_user_logged_in() ) { | |
return; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment