Home › Forums › Calendar Products › Events Calendar PRO › Override saved_venues_dropdown() after update to 3.11
- This topic has 6 replies, 3 voices, and was last updated 8 years, 8 months ago by Support Droid.
-
AuthorPosts
-
July 27, 2015 at 7:07 am #990489gonzalosanzaParticipant
Hello team. I had the saved_venues_dropdown function override using this steps: https://theeventscalendar.com/support/forums/topic/override-saved_venues_dropdown/
but now, after recent update to 3.11, It isn’t working.On file the-events-calendar/src/admin-views/events-meta-box.php, around line 115-118, to display the new multiple organizers feature, instead do_action( ‘tribe_organizer_table_top’, $event->ID ) as it used to be before the update, you are using the class Tribe__Events__Admin__Organizer_Chooser_Meta_Box, defined in the file the-events-calendar/src/tribe/admin/organizer_chooser_meta_box.php.
So, any help pointing me on the direction to fix this? is being a bit frustrating because I worked always with hooks to avoid problems when updating the plugin, however I’m having many problems after all updates…
Thanks.
Gonzalo.July 27, 2015 at 1:36 pm #990705BrianKeymasterHi Gonzalo,
I can try to help out here.
You are trying to modify the new organizer class that enabled multiple organizers.
That class is found in this file:
the-events-calendar\src\Tribe\Admin\Organizer_Chooser_Meta_Box.php
You are trying to query Organizers or Venues only if they have a custom field correct?
If so let me know and I can take a look and see if I see a way to do it.
Thanks
July 27, 2015 at 1:48 pm #990712gonzalosanzaParticipantHi, exactly, I have a custom field, a checkbox for organizers, to display theme on the dropdown only if the checkbox is checked. My code was working for organizers before 3.11 and is working for venues. But now, with the new feature, multiple organizers, its not working.
The real problem its to make it work with hooks, I don’t want to edit the-events-calendar\src\Tribe\Admin\Organizer_Chooser_Meta_Box.php and lost it in the next update.
So, any hook or similar?
Thanks!July 28, 2015 at 8:38 am #991060BrianKeymasterHi,
Is this in Community Events and the Admin event edit forms? Or just one of those you are trying to do this?
I have looked around, but not seeing a filter or action here.
This call to a method is creating the dropdown in that referenced class in my last reply:
$this->tribe->saved_organizers_dropdown( $organizer_id, ‘organizer[OrganizerID][]’ );
That is referencing this method:
saved_organizers_dropdown
In this file:
the-events-calendar\src\Tribe\Main.php
Unfortunately, the only way I see this working is to modify that method directly for now and then see about getting a filter in there for future releases that you could use to modify the query.
July 28, 2015 at 10:52 am #991127gonzalosanzaParticipantIts for both, Community Events and the Admin event edit forms.
Thanks.July 29, 2015 at 7:54 am #991420BrianKeymasterHi,
So looking through the plugin and what you are trying to do. The only way to do it is by modifying the plugin for the admin.
For Community Events you could remove the new class to display multiple Organizers and go back to 3.10 and grab the functions there and put them in place instead.
That could be done by moving these files to your theme to modify there so they will not be lost when updating the plugins:
the-events-calendar-community-events\src\views\community\modules\organizer.php
the-events-calendar-community-events\src\views\community\modules\organizer-fields.phpThat is about all I can find on how to do this unfortunately.
August 13, 2015 at 7:05 am #995724Support DroidKeymasterThis 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 ‘Override saved_venues_dropdown() after update to 3.11’ is closed to new replies.