Viewing 4 replies - 16 through 19 (of 19 total)
  • Thread Starter Rene Hermenau

    (@renehermi)

    i have written a small instruction copy about how to find out which of your plugins are generating this error message and how to fix it:
    https://www.mashshare.net/fix-the-error-get_currentuserinfo-is-deprecated-in-wordpress/

    Not only mailpoet is using the deprecated function get_currentuserinfo ().
    As the warning message does not give us a clue where get_currentuserinfo() is used i was thinking the instruction could be useful for the one or other.

    Regards,
    René

    Hi mitishi Hi Rene Hermenau
    Thanks a lot for the advices. Now my Websites have no errors.
    Best regards

    A quick way to narrow down where this is coming from is to open up wp-includes\functions.php and temporarily add a stack dump above where this error is generated. To display a stack dump, you can use:

    debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);

    And a good place to insert it in functions.php is just above the line number that gets quoted in the error:

    * @param bool $trigger Whether to trigger the error for deprecated functions. Default true.
    	 */
    	if ( WP_DEBUG && apply_filters( 'deprecated_function_trigger_error', true ) ) {
    		debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
    		if ( function_exists( '__' ) ) {

    This will show you the call stack, which should give you some idea of where it’s coming from. For me it was actually in header.php and not a plugin at all. Remember to take it out again afterwards!

    I am a real novice where do I enter the wp_get_current_user(); please. My issue was “you are using outdated element it is depreciated since version 4.6.” am I on the same issue page as you guys lol. I am on WordPress 4.7.1. Thank you

    • This reply was modified 7 years, 10 months ago by Roy Mackay.
Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘get_currentuserinfo() is deprecated since version 4.5’ is closed to new replies.