Cancel RSVP Programmatically (2)

Home Forums Ticket Products Event Tickets Plus Cancel RSVP Programmatically (2)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1183496
    tjkelly
    Participant

    [This is a continuation of this earlier “Cancel RSVP Programmatically” ticket.]

    Thanks for the help Cliff.

    What I am looking to do is programmatically remove an attendee’s RSVPing to an event. To this, hypothetically speaking, say I have:

    – User ID
    – Event ID
    ( and also the Ticket ID)

    I want to remove the RSVPing for that user. How can I programatically do this?

    Thanks

    #1183500
    tjkelly
    Participant

    If the answer here is something like “currently there’s no way…you’ll have to build your own,” that’s fine. I just need to know where the info is stored. It’s not in postmeta, where I thought it would be.

    #1183502
    tjkelly
    Participant

    This reply is private.

    #1183564
    tjkelly
    Participant

    This reply is private.

    #1184105
    Brook
    Participant

    Howdy TJ,

    You have made some awesome progress here.

    You might be interested in the class: Tribe__Tickets__Attendance

    Tribe__Tickets__Attendance::instance( $event_id )->increment_deleted_attendees_count( $num );

    You can set the num of attendees you deleted. If you do it this way then it will not throw off our attendance count algorithms, which typically need to keep track of how many tickets were deleted.

    You might also be interested in Tribe__Tickets__RSVP::delete_ticket() as an example, because it does a similar thing to what you are trying to do. It’s not identical to your needs, but it does show how to use our various APIs for removing a set of attendees.

    Did that help?

    Cheers!

    – Brook

    #1194524
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Cancel RSVP Programmatically (2)’ is closed to new replies.