• Resolved miguel

    (@miguelappstudio)


    How to somehow differentiate the orders in the ANALYSIS section depending on the user’s role?

    In the store we have two types of buyers, wholesalers and retailers.
    I want to know if I can add a filter to separate or differentiate in some way in the ANALYSIS section, the orders of wholesale customers, from the orders of retail customers.
    We need to make an independent control of given one of the roles and in WooCommerce there is no Filter to be able to separate or differentiate the orders.

    When applying filters in the Analysis => WordPress Orders section, if I want to add filters for orders, I only have the following filters:

    • order status
    • Products
    • Ratings
    • Coupon code
    • Customer type
    • Refunds
    • Tax Rates
    • Attribute

    In no way can I select the orders by the user ROLE

    1 – Can I do this in WooCommerce?
    2 – Can I differentiate in some way in the WordPress panel the orders according to the role of the user who made them?
    3 Can I do this without using plugins ?

    Thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hello,

    Sorry for asking, are you referring to the WooCommerce analytics section? Is that the section that you would like to filter by user role? Please clarify.

    On the other hand, if you are referring to the orders into the WooCommerce > orders section in the back end? If you meant this part, you can add custom code to filter by user role:

    Please be advised, we do not provide support for custom code, please try it out using a staging site at your own risk, if you want to proceed you can check it here, custom code can be added directly to the functions.php file, or you can add it using the code snippets plugin.

    Cheers.

    Thread Starter miguel

    (@miguelappstudio)

    Thanks for your quick response.
    I know that there is no support for code issues, I only created this discussion to see if I can find any ideas, not to solve my problems.

    Straight to the point.
    I don’t think I explained my needs well, I already have the option that you show me working on my website, only with a slightly different code than Jeroen has.
    Thank you.

    I need to be able to distinguish the user role in another section.
    I will show you with some capture.
    In the WordPress panel on the left
    ANALYSIS => ORDERS

    You can see the screenshot
    https://ibb.co/8B0jFvR

    And once inside we have the option of ADVANCED FILTERS:

    ADD A FILTER

    You can see the screenshot

    https://ibb.co/dbrDQq7

    This section of WordPress is where I want the filter to be displayed to be able to individually see the analysis of each of the user roles that I have in the store

    I hope to see the problem explained well

    Thanks for your dedication @ihereira

    • This reply was modified 1 year, 6 months ago by miguel.
    • This reply was modified 1 year, 6 months ago by miguel.

    Hi @miguelappstudio

    Thanks for providing further information about your inquiry here.

    I understand that you would like to add the user filter under Analytics > Orders to filter the data by user role.

    In the store we have two types of buyers, wholesalers and retailers.

    As a first step, can you please share with us how the two types of buyers were added to your site as this is not part of the core functions of WooCommerce?

    If this was added thru a third-party plugin or a custom code, it would be best to reach out to the developers for further assistance here.

    Thanks!

    Thread Starter miguel

    (@miguelappstudio)

    Thank you for your words @xue28 and I beg your pardon for the delay in responding

    You can create the roles you need in WordPres without the need for Plugins.

    At the time I installed a plugin to manage prices for Wholesale users, but I already eliminated this plugin, since I created the functionality that this plugin had.

    In my case there are several roles, just indicate these two, “wholesale customers” and “customers” (WordPress default)
    But on my site there are several more roles.

    Currently I don’t have any Plugin that manages user roles.

    But you gave me a good idea and I will keep looking elsewhere for information.
    If I find a solution, I’ll let you know.

    Thanks for spend your time on me, @ihereira and @xue28
    Greetings

    Hi @miguelappstudio

    You are most welcome here.

    You can create the roles you need in WordPres without the need for Plugins.

    At the time I installed a plugin to manage prices for Wholesale users, but I already eliminated this plugin, since I created the functionality that this plugin had.

    In my case there are several roles, just indicate these two, “wholesale customers” and “customers” (WordPress default)
    But on my site there are several more roles.

    Currently I don’t have any Plugin that manages user roles.

    On my personal site, these are the roles available under Users > Add New:

    I am not seeing the Wholesale Customers on my end.

    Currently I don’t have any Plugin that manages user roles.

    But you gave me a good idea and I will keep looking elsewhere for information.
    If I find a solution, I’ll let you know.

    For us to investigate your issue further, I’d like to understand your site properly. Please share your System Status Report that you can find via WooCommerce > Status. Select Get system report and then Copy for support. Once you’ve done that, you can paste it into your reply here.

    You could copy and paste your reply here or paste it via https://gist.github.com/ and send the link here.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Differentiate the orders in the ANALYSIS section depending on the user role’ is closed to new replies.