Forum Replies Created
-
AuthorPosts
-
March 23, 2016 at 3:03 pm in reply to: tribe_events_tickets_metabox_advanced problems after updated to 4.1 #1093163
Robert
Participantsrc/Tribe/Legacy_Provider_Support.php
public function on_init() { $this->find_active_legacy_modules(); if ( ! count( $this->active_legacy_modules ) ) { return; } add_action( 'tribe_events_tickets_metabox_advanced', array( $this, 'add_fields' ), 5 ); add_filter( 'tribe_events_tickets_ajax_ticket_edit', array( $this, 'add_fields_ajax' ) ); }In this snipet you are doing the same as me in my custom code.
March 23, 2016 at 2:25 pm in reply to: tribe_events_tickets_metabox_advanced problems after updated to 4.1 #1093136Robert
ParticipantMy goal is to customize your plugin a little. I’m adding location and date to the tickets and I’m selling a CPT Course. There is one course which has multiple tickets. Each ticket has location and date and you can buy the correct one provided by a form.
Also I think it’s not my custom code because my custom code is nearly a copy of your Legacy Support part. Same hooks and code. So if my code is buggy your legacy support will behave the same way.
March 23, 2016 at 1:08 am in reply to: tribe_events_tickets_metabox_advanced problems after updated to 4.1 #1092752Robert
ParticipantMy custom code adds extra fields to the add/edit ticket form. If I remove my code then the fields won’t be added. My problem is the fields are added multiple time when you click on the Edit button for a ticket. (on cpt edit page)
If you click twice my fields will be added 3 times. If you click 5 times my fields will be added 6 times.
And from the 5 same field only one filled with values which is coming from tribe_events_tickets_ajax_ticket_edit hook. The other fields might be added by tribe_events_tickets_metabox_advanced hook.And the problem appears only if I use the 4.1 version.
March 22, 2016 at 3:20 pm in reply to: tribe_events_tickets_metabox_advanced problems after updated to 4.1 #1092645Robert
ParticipantOf course I’m not asking you to check my code because it is working perfectly with early versions. So I just showing you how to replicate the problem. I’m using the same filters like you use in your plugin for Legacy support so if my code is bad your code will be buggy as well.
Robert
ParticipantHi,
It’s done.
Robert
Robert
ParticipantThank you. This is what I was looking for.
Robert
ParticipantHm,
post__not_inworks fine. But it still requires"eventDisplay" => "custom",argument in the query to work like a normal WP_Query. So I keep up that not P2P plugin uses wordpress functions in a bad way, but you should change the logic with this “eventDisplay” argument. It should be normal WP_Query without this argument, and you should useeventDisplay => "tribe"to make your custom queries working.Thanks!
Robert
ParticipantThis is not only a P2P problem. The
tribe_get_events(array("exclude" => array($promoted_event)))should also work. But for some reason its not excluding the given event. So i guess there should be some problem in the plugin custom query modifications.Robert
ParticipantAnyone?
Robert
ParticipantAre you sure you not crashing something with the query?
Just because i can see some strange behavior:
$args = array ( "exclude" => array($promoted_event), "posts_per_page" => 4, "post_type" => "tribe_events", "orderby" => "event_date", "order" => "ASC" );$events = get_posts( $args );
This gives me back the good result with 4 events past and future promoted excluded.$events = tribe_get_events( $args );
This gives me back bad result because the excluded event is there.$events = new WP_Query( $args );
This gives me back only the future events including the excluded event.Or if I add
eventDisplay => 'custom'to the query args it gives back the same result liketribe_get_events( $args );So there should be something wrong no?
-
AuthorPosts
