Home › Forums › Ticket Products › Event Tickets Plus › Separating RSVP and Woocommerce Tickets for different Post Types.
- This topic has 5 replies, 4 voices, and was last updated 9 years, 10 months ago by
metapixel.
-
AuthorPosts
-
May 18, 2016 at 9:45 pm #1116244
metapixel
ParticipantI have Event Tickets Plus and Woocommerce installed in my website. I have enabled Event Tickets Plus for my custom post type and it is working as intended. What I want to do is enable the RSVP option ONLY for a custom post type and enable the Woocommerce option ONLY for a different custom post type? How do I go about that?
Thanks!
May 18, 2016 at 10:06 pm #1116247Brook
ParticipantHello again!
This is actually going to be pretty similar to your last topic. However, I really appreciate you following the forum guides by opening separate topics. We have found that typically it results in faster response times and better organization for folks searching through.
The first thing I would do is remove the ticket area as I walked you through in the last one. This code should remove both the RSVP and Woo areas from the default:
[php]function tribe_remove_tickets_in_page ( ) {
if ( !class_exists(‘Tribe__Tickets_Plus__Commerce__WooCommerce__Main’) ) return;
// remove default action
remove_action ( ‘the_content’, array ( Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance(), ‘front_end_tickets_form_in_content’ ) );
remove_action ( ‘the_content’, array ( Tribe__Tickets__RSVP::get_instance(), ‘front_end_tickets_form_in_content’ ) );}
tribe_remove_tickets_in_page ();[/php]With that hidden now you just need to insert them back. This code will do it for Woo:
Tribe__Tickets_Plus__Commerce__WooCommerce__Main::get_instance()->front_end_tickets_form_in_content();And use this to insert the RSVP somewhere:
Tribe__Tickets__RSVP::get_instance()->front_end_tickets_form_in_content();Did that do what you needed? Can I clarify anything?
Cheers!
– Brook
May 18, 2016 at 10:30 pm #1116251metapixel
ParticipantSorry, I was a bit unclear from what I needed. What I need to do is for the post creation/edit dashboard page of my custom post type with tickets enabled. When I create a new ticket, there is a radio button option for RSVP or Woocommerce. I need to separate the 2 options in the post creation/edit dashboard page, RSVP only for a specific custom post type and Woocommerce only for a different custom post type. Sorry for the misunderstanding and thanks in advance.
May 19, 2016 at 10:18 am #1116541Brook
ParticipantI follow you now. Unfortunately there is no “right” way to do that, it will require directly modifying one of the files in our plugin. Thus it will get overriden when we update. We are actually hoping to make that file overridable in the future, but until then, and it could be a few months away, updating the plugin will cause your code change to disappear and there is no way around it. You will need to redo the change post update.
What you would do is modify this file: /event-tickets/src/admin-views/meta-box.php and on line 19 you will see the $modules variable. This is an array containing each ticket module available for the plugin. In your case it will have Woo and RSVP. You would want to modify this array on whatever post type or page you need to, removing the option from it you don’t need.
I wish I had better news on this front. Please do let me know if you have any questions. Cheers!
– Brook
June 3, 2016 at 9:35 am #1122248Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘Separating RSVP and Woocommerce Tickets for different Post Types.’ is closed to new replies.
