Home › Forums › Ticket Products › Event Tickets Plus › Event Categories to WooCommerce Categories on Ticket Creation
- This topic has 3 replies, 2 voices, and was last updated 7 years, 9 months ago by
dannycare.
-
AuthorPosts
-
June 28, 2018 at 8:41 am #1563653
dannycare
ParticipantHi,
I’ve been trying for the best part of today to do what is usually a very simple thing in WordPress, which your plugin has somehow made incredibly tedious and complicated.
This is what I want to do – Whenever an event is saved, update the WooCommerce Ticket Product associated with that event to show the same category as the event ID.
I’ve tried several methods which I’ll post below:
//on event post save, add categories to all tickets function ticket_to_product_sync( $post_id ) { //get categories $terms = get_the_terms($post_id, 'tribe_events_cat'); //Get ticket id $ticket_id = Tribe__Tickets__Tickets::get_all_event_tickets( $event->ID ); //add categories to tickets $count = count($terms); if ( $count > 0 ){ foreach ( $terms as $term ) { wp_set_object_terms( $ticket_id , $term->slug, 'product_cat', true ); } } } add_action( 'save_post', 'ticket_to_product_sync', 10, 4 );And this:
// Create WooCommerce Category for ticket function ticket_to_product_sync( $event_id = null, $ticket, $raw_data, $classname ) { // Get the Event Category $term_list = wp_get_post_terms( $event_id, Tribe__Events__Main::TAXONOMY ); // Apply categories from event ID to ticket when saved foreach( $terms as $term ) { wp_set_object_terms( $ticket_id , $term->name, 'product_cat', true ); } } add_action( 'save_post', 'ticket_to_product_sync', 10, 4 );I understand that applying an event category to a newly created ticket has a workflow issue whereby someone may create a ticket before they apply a category – But I don’t care about the event category being added when a ticket is added, I can simply save the event whilst I’m there once a ticket has been added. Not a big deal.
I’m at the end of my tether, both with this overly complex method of doing what is in theory an incredible simple task (which I have done with other plugins who correctly utilise WordPress functions) and also reading through all the other support topics with other paying customers asking for the same thing, only to be met with a cookie cutter, copy and paste answer. “Sorry, but we don’t provide coded plugin support, you can however check out the list of Known Developers.” Really?
This should be in the events ticket core plugin, full stop. Why hasn’t this been added yet?
You might think I’m being unreasonable here, and I understand whoever is reading this, it probably isn’t your fault. But do you know how frustrating it is when you’re trying to solve an issue with zero customer support help, little to no codex references (and the ones that are, seem to be totally wrong or out of date)?!
If you aren’t going to provide support for this problem among others, you need to provide a solid, in-depth documentation for developers to be able to quickly create their own solutions instead of having to muddle through the intense plugin core files for hours on end. Do you really expect people to learn the entire framework of your plugin to change one small thing?
I look forward to a fully working, coded solution to this. Feel free to mark your response as private if you feel it conflicts with the interests of promoting your ‘Known developers’.
June 29, 2018 at 4:18 pm #1564902Jennifer
KeymasterHello,
I’m sorry that you’ve had such a difficult time working on this customization; I definitely understand how frustrating that can be.
Unfortunately custom coding is not something that is covered in our Help Desk, as outlined here in our forum guidelines. In order to ensure that bug reports and questions on using our plugin features are addressed in a timely manner, we simply do not have the resources to be able to provide custom code as part of our standard premium support policy.
However, we do love to help out whenever we have the resources to do so! If you’d like, what I can do is flag this with the team and – although we can’t make any promises – if we have time and space to come back and help, we’ll be happy to do so. Please let us know if you’d like to go this route so that you can be added to this queue.
In the meantime, if there is any more information you can share that will help us to better understand what you are looking for, feel free to add it to this thread.
We do our best to update our documentation as things change, but if you have found documentation that is out of date, we would definitely appreciate it if you could let us know which articles you are referring to so that we can get them updated!
Regarding adding this to core, please do post this as a feature request over in our Feature Ideas Forum if this is something that you would like to see happen in the future. This is what we use to gauge user interest in new features and help guide future development efforts.
Thanks,
Jennifer
July 9, 2018 at 1:17 pm #1571017dannycare
ParticipantHi there,
Thank you for your reply. Has there been any progress on this yet? I appreciate you are busy.
July 11, 2018 at 4:43 am #1572477Jennifer
KeymasterHello,
I have added this thread to our queue, so if one of our team members is able to come back and help further with this, you’ll be notified of their reply (if you’ve subscribed to notifications for this thread). Thank you for your patience!
August 2, 2018 at 9:35 am #1588730Support Droid
KeymasterHey 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 ‘Event Categories to WooCommerce Categories on Ticket Creation’ is closed to new replies.
