• Resolved myenglishimages

    (@myenglishimages)


    Hi!

    I was looking for documentation on how to add this automation but couldn’t find it.

    When a visitor to my site purchases a woo commerce product, it automatically assigns them the user role of “customer”. I’d like to add or change their user role.

    Trigger
    I set the Trigger to WooCommerce: Guest Purchases + Product Name 1 Time

    Action
    Then it says actions will be run on Existing User / New User
    I’m not sure how to set this and couldn’t find it in the documentation.

    I set the action to WordPress: Add role [New Role Name]

    I’m sure I haven’t configured this correctly, and am still trying it out, but any help would be greatly appreciated.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Ruben Garcia

    (@rubengc)

    Hi @myenglishimages

    In our Getting Started docs all the basics are explained:
    https://automatorwp.com/docs/getting-started/

    For your case, AutomatorWP has support for 2 kind of automations:
    Logged-in: Logged-in automations are designed to handle logged-in users interactions and to run actions on the same user who has completed the triggers.

    Anonymous: Anonymous automations are designed to handle anonymous users interactions (not logged-in users) and to lets you create new users or choose an existing one.

    You have selected an anonymous automation, for that anonymous automations requires to “create” or “select” a user to work.

    But if what you want is to change the user role, you do not need to create a anonymous automation.

    WooCommerce automatically creates a user account, and anonymous purchases are only placed when you have setup WooCommerce to NOT create user accounts, but if your WooCommerce creates those accounts you need to perform the following:
    1 – Create a logged in automation
    2 – Select the trigger “User purchases a product”
    3 – Select the action “Add user role”

    Hope it helps!

    Thread Starter myenglishimages

    (@myenglishimages)

    So sorry to take a little time getting back to you, but I wanted to say THANK YOU!

    This worked perfectly!

    Plugin Author Ruben Garcia

    (@rubengc)

    You’re welcome @myenglishimages

    Glad to know that everything is working for you now! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add / Change User Role’ is closed to new replies.