Coding Issue with Roles/Capabilities
-
Hi,
In class-points-rewards-for-woocommerce-public.php on line 244 you have:
if ( in_array( 'subscriber', $user->roles ) || in_array( 'customer', $user->roles ) ) {Please consider:
if ( current_user_can('read') ) {( Refer https://wordpress.org/support/article/roles-and-capabilities/#read )
As an administrator on the site without the user roles you are looking for, the points menu does not show up for me in “My Account”, which lead me to think your plugin is broken. Defining a minimum capability eliminates that issue.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Coding Issue with Roles/Capabilities’ is closed to new replies.