Hello @alexb12,
Thank you for your question.
In order to achieve this, you will need a custom code:
add_filter( ‘pms_submenu_page_capability’, ‘pmsc_change_submenu_page_capability’, 20, 2 );
function pmsc_change_submenu_page_capability( $capability, $page ) {
if ( $page == ‘pms-members-page’)
return ‘edit_users’;
return $capability;
}
You have to add the code as a custom plugin, here is how to do this:
https://www.cozmoslabs.com/docs/paid-member-subscriptions/developer-knowledge-base/
And then users with the edit_users capability will be able to see the Members page.
Kind regards,
Hi dariusraia,
thank you so much for the reply and the time you take to explain and the code.
unfortunately, it doesn’t work, even i have done exactly what said as the following:
I have made the plugin and here is a screenshot (https://ibb.co/rdk2tjh)
I have also updated the rule to have edit_users (https://ibb.co/RzJnnzf)
and still, the shop manager has no access to see the plugin (https://ibb.co/jr54Qqm)
i will be waiting for your kind reply and big thanks in advance 🙂
BR/ Alex
Hello @alexb12,
Thank you for the follow up.
Please try this code, it should work just fine.
In order to achieve this, 2 things are necessary:
* add this custom capability to their user role: pms_edit_capability
* then you also need to add this custom code snippet to your website:
add_filter( ‘pms_submenu_page_capability’, ‘pmsc_allow_editors_to_view_pages’, 20, 2 );
function pmsc_allow_editors_to_view_pages( $capability, $menu_slug ){
if( $menu_slug == ‘pms-payments-page’ || $menu_slug == ‘pms-members-page’ )
return ‘pms_edit_capability’;
return $capability;
}
Hi Again Dariusraia, and thank you so much for your reply,
I have done exactly what you said, and still unfortunately no result
i have added the custom code snippet to my theme function file,
here is a screen shot (https://ibb.co/30w3bd9)
i will be waiting your kind reply on this and wish you a great day today.
BR/ Alex
Hi Guys,
any help with this 🙂
thanks 🙂
Hello @alexb12,
Can you open a ticket on our website and link the thread here please ?
https://www.cozmoslabs.com/support/open-ticket/
Regards.
Hello Georgian:
i have just submitted the ticket.
thanks alot