• Resolved Den

    (@denmayday)


    I see a lot of errors in my log with

    PHP Deprecated:  Function WP_User_Query was called with an argument that is deprecated since version 5.9.0! who is deprecated. Use capability instead. in /wp-includes/functions.php on line 6031

    Apparently argument who in get_users is deprecated since WP version 5.9.0 and there a lot of places where I see it in class-anwp-post-grid-elements.php

    Suggestion is to use capabilities for newer versions of WP using something like

    if ( version_compare( $GLOBALS['wp_version'], '5.9', '<' ) ) {
    	$args['who'] = 'authors';
    } else {
    	$args['capability'] = [ 'edit_posts' ];
    }
    • This topic was modified 9 months, 2 weeks ago by Den.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘get_users “who” argument is deprecated since WP version 5.9.0’ is closed to new replies.