How to unhook a Dokan Function
-
Hi
I am trying to write a code snippet that allows me to disable the Dokan function ‘block_admin_access()’.
This function is very handy to block backend admin access to the user roles ‘seller’, ‘customer’, ‘vendor_staff’. However, I am trying to use another plugin that requires a user (seller) to access certain admin pages, and the Dokan function ‘block_admin_access()’ is blocking any access to the admin section unless the user role is none of those as mentioned above. Instead, they are constantly redirected to the home page.
I have tried this to remove (unhook) the function:
remove_action( 'admin_init', 'block_admin_access');
but it did not work.
If I can get the remove action hook to work, I will run it on the pages I need to give user access to admin pages.
Please offer whatever help you can.
Thanks
Steven
- You must be logged in to reply to this topic.