ID; } add_filter( 'determine_current_user', 'json_basic_auth_handler', 20 ); function json_basic_auth_error( $error ) { // Passthrough other errors if ( ! empty( $error ) ) { return $error; } global $wp_json_basic_auth_error; return $wp_json_basic_auth_error; } add_filter( 'rest_authentication_errors', 'json_basic_auth_error' );