Reference Ticket https://theeventscalendar.com/support/forums/topic/deprecated-php-error-in-latest-update-4-6-7-of-the-events-calendar/
I made an edit to a function in my functions.php file as suggested by the deprecated notice but I am still getting the deprecated notice.
PHP Notice: /wp-content/plugins/the-events-calendar/src/deprecated/TribeEvents.php is deprecated since version 3.10! Use Tribe__Events__Main instead. in /wp-includes/functions.php on line 3966
The deprecated function is a code snippet provided in the Knowledgebase for “Fixing HTTP 404 errors”. The code snippet is provided in the first bullet under “Less common solutions” and it was working. The snippet is in GitHub at https://gist.github.com/elimn/877bc90421526d22900b
I have changed
remove_action( 'init', array( TribeEvents::instance(), 'init' ), 10 );
add_action( 'init', array( TribeEvents::instance(), 'init' ), 1 );
to
Tribe__Events__Template_Factory::asset_package('ajax-calendar');
Tribe__Events__Template_Factory::asset_package('events-css');
but I still get the warning notice.
Does if (class_exists('TribeEvents')) { also need to be changed? Should it be if (class_exists('Tribe__Events__Main')) {?
I think many users are using this snippet. The GitHub snippet needs to be updated so it doesn’t generate a PHP Notice.
Note: I have not switched to a different theme or tested plugins because I know the problem is in this snippet.