• Resolved giannisdallas

    (@giannisdallas)


    Hello there,

    I created a custom User Role in my shop and I wanted to assign access to the abandoned carts as well,

    Can you please help me? is there a $role->add_cap( $cap ); capability I can use?

    Thank you, keep up the great work

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor chetnapatel

    (@chetnapatel)

    Hi,

    We will surely help you to achieve your requirement.

    Before looking into the solution for this, I should have some information and I have some queries for this.

    Can you please let me know you want to assign the access of our plugin for the custom user Role to show the backend of the Admin area or the abandoned carts are not being captured on your site of that user whose User Role is custom which you have created?

    Can you please share with us the code which you have customized on your site? So, I can test it at our end. You can send it us on “support at tychesoftwares dot freshdesk dot com” email address if you are not comfortable to provide your code here.

    Regards,
    Chetna Bhutka

    Thread Starter giannisdallas

    (@giannisdallas)

    Hey Chetna,

    I want the Shop assistant to be able to see the carts. The admin sees them just fine.

    After creating the role I added the following permissions so far:

        $role = get_role('shop_assistant');
        $role->add_cap("edit_product");
        $role->add_cap("read_product");
        $role->add_cap("delete_product");
        $role->add_cap("edit_products");
        $role->add_cap("edit_others_products");
        $role->add_cap("publish_products");
        $role->add_cap("read_private_products");
        $role->add_cap("delete_products");
        $role->add_cap("delete_private_products");
        $role->add_cap("delete_published_products");
        $role->add_cap("delete_others_products");
        $role->add_cap("edit_private_products");
        $role->add_cap("edit_published_products");
        $role->add_cap("manage_product_terms");
        $role->add_cap("edit_product_terms");
        $role->add_cap("delete_product_terms");
        $role->add_cap("assign_product_terms");
        $role->add_cap("upload_files");
        $role->add_cap("edit_posts");
        $role->add_cap("edit_others_posts");
        $role->add_cap("edit_published_posts");
       $role->add_cap("publish_posts");

    What else do I need to add?
    Thanks a lot

    Plugin Contributor chetnapatel

    (@chetnapatel)

    Hi,

    Thank you for sharing with us the code which you have added.

    You can add code as below to access abandoned carts for the custom user role:

    $role->add_cap("manage_woocommerce");

    I have tested it on my server and it is allowing to access our plugin to the custom role like this: https://prntscr.com/lj50r0

    Let me know if you have any help from us.

    Regards,
    Chetna Bhutka

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom User role’ is closed to new replies.