Home › Forums › Calendar Products › Events Calendar PRO › Reopen "Deprecated PHP error in latest update 4.6.7 of The Events Calendar"
- This topic has 3 replies, 2 voices, and was last updated 6 years, 2 months ago by Cynthia Lockley.
-
AuthorPosts
-
January 22, 2018 at 8:48 am #1432421Cynthia LockleyParticipant
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 beif (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.
January 23, 2018 at 1:02 pm #1433977AndrasKeymasterHello Cynthia,
Thanks for reaching out! That is a great question there!
Yes, you are right. The ‘if’ clause also needs to be changed.
Here is the full modified snippet for reference. I tested it and should work with the current versions.
https://gist.github.com/andrasguseo/b3283cb4503c880a205448dbafc19f7b
Let me know if this does the trick.
Cheers,
AndrasFebruary 14, 2018 at 8:36 am #1453030Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Reopen "Deprecated PHP error in latest update 4.6.7 of The Events Calendar"’ is closed to new replies.