-
I am fetching
rankmath/v1/getHead
locally usingrest_do_request()
and it keeps logging the following PHP notice to debug.log:PHP Notice: Function WP_Block_Type_Registry::register was called <strong>incorrectly</strong>. Block type "rank-math/rich-snippet" is already registered. Please see <a href="https://wordpress.org/support/article/debugging-in-wordpress/">Debugging in WordPress</a> for more information. (This message was added in version 5.0.0.) in /shared/httpd/wptest/htdocs/wp-includes/functions.php on line 5831
I do not seem to get this notice when using
wp_remote_get()
or visiting the rest endpoint in the router directly.The code snippet to reproduce this issue:
$url_param = 'mydomain.local'; $rest_url = get_rest_url(null, '/rankmath/v1/getHead?url=' . $url_param ); $request = \WP_REST_Request::from_url( $rest_url ); $response = rest_do_request( $request );
Env
WordPress: 6.0.1
Rank Math: 1.0.94
PHP: 8.0.19
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The ticket ‘fetching `rankmath/v1/getHead` with `rest_do_request()` logs a PHP Notice’ is closed to new replies.