Upgrading WP User Role on Ticket Purchase

Home Forums Ticket Products Event Tickets Plus Upgrading WP User Role on Ticket Purchase

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1150461
    Andrew
    Participant

    Is it possible to upgrade a users to a specific WordPress User Role when someone purchases a ticket?

    #1150467
    Nico
    Member

    Hi Andrew,

    Thanks for getting in touch with us! Interesting questions here.

    I guess it’s possible, a way of doing this could be to hook to the order complete status. Take a look at this sample for WooCommerce: detecting order complete / on order completion. If you are using another e-commerce engine you will want to see if an equivalent action is available for it. Once you have hooked to that action you’ll need to get the order object and iterate the items in it to see if a ticket has been actually purchased.

    Also, check this answer in stackexchange about actually changing the user role via code.

    Please let me know if that helps,
    Best,
    Nico

    #1159314
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Upgrading WP User Role on Ticket Purchase’ is closed to new replies.