Advertisement
verygoodplugins

Untitled

Oct 18th, 2019
335
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.27 KB | None | 0 0
  1. function hide_product_if_have_tag( $can_access, $user_id, $post_id ) {
  2.  
  3.     if ( $post_id == 123 && wp_fusion()->user->has_tag( 'Tag Name' ) ) {
  4.         $can_access = false;
  5.     }
  6.  
  7.     return $can_access;
  8.  
  9. }
  10.  
  11. add_filter( 'wpf_user_can_access', 'hide_product_if_have_tag', 10, 3 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement