Hi Roberto,
Could you provide more details about what customers information do you want to protect? Do you see any users’ private data on front-end that you want to protect? If you have some kind of Customer or just Subscriber role you shouldn’t see any personal data of other users.
Cheers
Hi, thank you for the answer!
I would like that a specific woocommerce customer can see just his own credentials (name, username, email etc).
If I deny to woocommerce customers to see all customers data, a specific customer can’t see his own profile data.
I hope I’ve been clear
I’m afraid that WooCommerce doesn’t have any capabilities to hide the profile details of other users. However, please contact their support to see if they have any solution for this.
??? Woocommerce doesn’t have the capability to hide the profile details of other users..
YOUR PLUGIN DOES! This is why I’m using your plugin:
A customer can sign in as customer and he can list all products, for example, but he can’t list all users details. And this work fine for me, except for the fact that he can’t access to his own user detail..
I hope I’ve been clearer now!
Sorry I wasn’t so clear about it. What I meant is that if WooCommerce doesn’t provide such capability Members will not display it. You can add custom capability with this snippet:
add_action( 'members_register_caps', 'cp_members_register_caps' );
/**
* Register a custom capability in Members.
*
* @return void
*/
function cp_members_register_caps() {
members_register_cap( 'custom_cap', array( 'label' => 'Cap Label' ) );
}
Keep in mind that Members will let you create the capability or edit existing roles, but it won’t let you control every setting across your entire site. Displaying users details based on capability would require custom code.
Hopefully, that makes sense.
Yes, this answer seems to be very helpful.
I will try this way,
thank you!