Override saved_venues_dropdown() after update to 3.11

Home Forums Calendar Products Events Calendar PRO Override saved_venues_dropdown() after update to 3.11

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #990489
    gonzalosanza
    Participant

    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.

    #990705
    Brian
    Keymaster

    Hi 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

    #990712
    gonzalosanza
    Participant

    Hi, 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!

    #991060
    Brian
    Keymaster

    Hi,

    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.

    #991127
    gonzalosanza
    Participant

    Its for both, Community Events and the Admin event edit forms.
    Thanks.

    #991420
    Brian
    Keymaster

    Hi,

    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.php

    That is about all I can find on how to do this unfortunately.

    #995724
    Support Droid
    Keymaster

    This 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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Override saved_venues_dropdown() after update to 3.11’ is closed to new replies.