• Resolved spulut

    (@spult)


    Hello,

    Plugin is great. Thank you.

    Is here any code to add to functions.php to exclude some users from e.g. dropdown list?

    Also it is not working when users connecting with social login like as Google, Facebook, Apple etc.

    Thanks

    • This topic was modified 1 year ago by spulut.
Viewing 1 replies (of 1 total)
  • Plugin Author Sanjeev Aryal

    (@sanzeeb3)

    If you’re using WooCommerce, and want to exclude the delete account tab in account page,

    add_filter( 'wpfda_disable_delete_account_tab', function() {
    
    ? ? $user ? ? ? ? ? ?= wp_get_current_user();
    
    ? ? $excluded_roles ?= array('editor', 'administrator', 'author');
    
    ? ? if( array_intersect( $excluded_roles, $user->roles ) ) {
    
    ? ? ? ? return true;
    
    ? ? }
    
    ? ? return false;
    
    });


    It’s a good Feature to be included within the plugin itself – which is being noted along with the social logins.

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude specific users’ is closed to new replies.