Advertisement
arie_cristianD

subscriber cannot acces frontend submit

Dec 6th, 2023
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.32 KB | None | 0 0
  1. $user = wp_get_current_user();
  2. foreach ( $user->roles as $role ) {
  3.     if ( $role === 'subscriber' ) {
  4.         add_filter( 'jnews_frontend_submit_user_subscription', '__return_false' );
  5.         remove_filter( 'jnews_account_page_endpoint', array( JNews_Frontend_Endpoint::getInstance(), 'account_page_endpoint' ) );
  6.  
  7.         break;
  8.     }
  9. }
  10.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement