Home › Forums › Ticket Products › Event Tickets Plus › Change Ticket ID/# format (remove unique ID appended to end of Ticket #'s)
- This topic has 2 replies, 2 voices, and was last updated 5 years, 8 months ago by marksalvadore.
-
AuthorPosts
-
July 8, 2018 at 3:09 am #1570217marksalvadoreParticipant
Hello,
I’m trying to use this plugin to enable a client to sell raffle tickets on their website.
I was initially having issues getting sequential ticket numbers to work. After some trail and error I found that using the Tribe Commerce option doesn’t allow for sequential numbers as it just grabs the next available post_id as the ticket number.
I’ve since switched to using Woocommerce and the sequential numbering is working now. The issue I’m having is the ticket numbers have some type of unique id appended to them (see text marked in red on attached image).
I’m afraid this will confuse my client and was wondering if there is a way to disable this unique id or remove it.
To clarify I would like to go from ticket numbers being like this:
RAFFLE-1-O98DM6
RAFFLE-2-UMIPED
RAFFLE-3-5X3CLQ
RAFFLE-4-W7HNT5
RAFFLE-5-YMONQATo this:
RAFFLE-1
RAFFLE-2
RAFFLE-3
RAFFLE-4
RAFFLE-5July 8, 2018 at 4:14 am #1570222marksalvadoreParticipantJust a quick follow up, I think I’ve solved the problem on my own.
I hooked into the
event_tickets_woocommerce_ticket_created
action and modified the post meta that sets the ticket number.function modify_ticket_after_created($attendee_id){ $ticket_id = get_post_meta($attendee_id, '_unique_id', true); $ticket_id = substr($ticket_id, 0, strrpos($ticket_id, '-')); update_post_meta($attendee_id,'_unique_id', $ticket_id); } add_action('event_tickets_woocommerce_ticket_created', 'modify_ticket_after_created', 10, 1);
July 9, 2018 at 2:23 am #1570484AndrasKeymasterHello Mark,
Thanks for using our plugins and welcome to the forums!
Happy to hear you found a solution. Awesome job there mate!
Please let me know if you need any further assistance with this, or if we can close this as resolved.
Cheers,
AndrasJuly 31, 2018 at 9:35 am #1586762Support DroidKeymasterHey 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 -
AuthorPosts
- The topic ‘Change Ticket ID/# format (remove unique ID appended to end of Ticket #'s)’ is closed to new replies.