Class 'Tribe__Events__Pro__Recurrence_Meta' not found

Home Forums Calendar Products Events Calendar PRO Class 'Tribe__Events__Pro__Recurrence_Meta' not found

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1089463
    Gilles
    Participant

    After the update today, I am getting the following error from code in my functions.php:

    [16-Mar-2016 01:53:08 UTC] PHP Fatal error: Class ‘Tribe__Events__Pro__Recurrence_Meta’ not found in …

    How do I fix this?

    Thank you,
    Gilles

    #1089824
    Josh
    Participant

    Hey Gilles,

    Thanks for reaching out to us!

    You can address this by wrapping the code that uses the “Tribe_Events_Pro_Recurrence_Meta” class in a conditional like:

    
    if( class_exists('Tribe_Events_Pro_Recurrence_Meta') ) { your code here }
    

    You should then be able to access your dashboard again and reactivate the Pro plugin.

    Let me know if this helps.

    Thanks!

    #1090054
    Gilles
    Participant

    So I found the problem. You recently changed ‘Tribe_Events_Pro_Recurrence_Meta’ to ‘Tribe_Events_Pro_Recurrence__Meta’, ie you added the missing underscore before ‘Meta’. That’s why my code broke.

    All fixed now. Is there a better function I can use that would not be subject to such changes? This is the function I’m calling:

    $event_ids = Tribe__Events__Pro__Recurrence__Meta::get_events_by_slug($event_slug);

    Gilles

    #1091010
    Josh
    Participant

    Hey Gilles,

    Thanks for following up here.

    This should be good for now. This issue was due to the class name changing which it shouldn’t get changed again for a while now that we’ve completed some of this refactoring. Now that you have it wrapped though, you won’t have to worry about any changes ever breaking the site on update.

    Let me know if this helps.

    Thanks!

    #1097418
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Class 'Tribe__Events__Pro__Recurrence_Meta' not found’ is closed to new replies.