• Resolved stevec0023

    (@stevec0023)


    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @stevec0023 ,

    Removing the action alone will not be enough to achieve your requirements. This will require proper advanced customization of the Dokan and WooCommerce codebase. We recommend consulting with a professional WordPress customization expert to assist you with this customization.

    Unfortunately, due to our support policy, we are unable to assist with custom requirements. Please find the support policy at this link – https://dokan.co/support-policy/

    We appreciate your understanding!

    Thanks!

    Plugin Support Tanvir Hasan

    (@tanvirh)

    Hi @stevec0023

    As we haven’t heard back from you for a while, we’ll consider this topic resolved. If you encounter any further issues, please don’t hesitate to open a new topic.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.