• Resolved gama6889

    (@gama6889)


    hi every one.
    I get this error after updating “the events calendar” plugin to latest version.
    There is a problem with tribe_get_events and all things worked before updating correctly.

    please help me about this error.

    Error:
    Fatal error: Call to undefined function tribe_get_events() in functions.php file.

    • This topic was modified 6 years, 1 month ago by gama6889.
Viewing 9 replies - 1 through 9 (of 9 total)
  • We are having this issue too. Did you find a solution?

    Hey there,

    Thanks for reaching out ??

    Can you provide an example of how you are using tribe_get_events within functions.php?

    Take care,
    Ed ??

    Thread Starter gama6889

    (@gama6889)

    Hi
    Thanks a lot for asnwering

    It is an example of using this function:

    
    global $ourEvents;
    	if(my_wp_is_plugin_actived('the-events-calendar/the-events-calendar.php'))
    	{
    
    // Retrieve the next 5 upcoming events
    		$events = tribe_get_events(array(
    			'posts_per_page' => $numberOfEvents, 'orderby' => 'EventStartDate', 'order' => 'DESC'
       ));
    ...
    
    • This reply was modified 6 years, 1 month ago by gama6889.

    Hi I’m also facing this issue after updating the events calendar plugin from 4.7.3 to 4.8.1.
    did you find any solution for this?

    Thanks

    We aren’t actually using it in functions.php, we are using it in one of our controllers in our theme. It was working great before the most recent update.
    This is what we are doing:

            $args = array(
                'posts_per_page' => 2,
                'tribe_events_cat' => 'Anniversary'
            );
    
            $events = tribe_get_events( $args );
    
            foreach( $events as $event ) {
                $event->excerpt = tribe_events_get_the_excerpt( $event->ID );
                $event->permalink = get_permalink( $event->ID );
                $event->date_date = strip_tags( tribe_get_start_date( $event->ID ) );
                $event->venue_display = strip_tags( tribe_get_venue( $event->ID ) );
            }
    

    I’m not able to reproduce this as of now, still trying some different things.

    I’d definitely take a run through Testing for Conflicts if you haven’t already.

    Also, what version of PHP are you running?

    Take care,
    Ed ??

    We are using 7.1, but also tried 7.2

    Thread Starter gama6889

    (@gama6889)

    We are using PHP version 5.5.12.

    Thread Starter gama6889

    (@gama6889)

    Hi every one

    My problem was solved after updating to PHP version 5.6.18.

    I hope it be useful for other persons too.

    • This reply was modified 5 years, 11 months ago by gama6889.
    • This reply was modified 5 years, 11 months ago by gama6889.
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Call to undefined function tribe_get_events()’ is closed to new replies.