Detect Use of Deprecated Functions?

Home Forums Calendar Products Events Calendar PRO Detect Use of Deprecated Functions?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1104883
    Josh
    Participant

    Hello,

    I recently updated from 3.12.6 to latest, and I noticed that the changelog included a number of deprecated functions. I searched through the code I have for templates I have overwritten and noticed that I am using a number of these functions (in particular tribe_events_the_notices, tribe_event_link, tribe_get_organizer_link, Tribe__Events__Date_Utils, tribe_event_format_date). Is there any way for me to tell which of these functions I am using in case I missed one? I would expect to get warning messages in the logs but I don’t see any.

    Thanks,
    Rafe

    #1105095
    Brook
    Participant

    Howdy Rafe,

    Good question. The deprecated functions will be logged as E_NOTICES. However, WordPress might be setup to suppress the logging of those errors. Before you can see those error you will need to set WP_DEBUG  to true. However as noted in that article you might not want these errors to be publicly visible on your site, unless it is a testing or staging site. So you might want to set “WP_DEBUG_LOG” to true and set “WP_DEBUG_DISPLAY” to false after enabling WP_DEBUG itself.

    Once you have logging setup navigating around the calendar will start generating those errors. If you visit a page or do an action that involves  a deprecated function, the function name and its replacement should be in your logs.

    Does that sound like a plan?

    Cheers!

    – Brook

    #1107100
    Josh
    Participant

    That works, thanks!

    #1107233
    Brook
    Participant

    You are very welcome! I am happy you reached out. Let us know if ever need anything else.

    Cheers!

    – Brook

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Detect Use of Deprecated Functions?’ is closed to new replies.