The site I’m working on is showing this issue on the posts/pages on the dashboard.
"Notice: register_rest_route was called incorrectly. The REST API route definition for yoast/v1/get_head is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. "
I just updated to WP 5.7.2 and the Yoast SEO Premium is version 14.4.1.
Does anyone know how to address this?
2
Answers
The permission_callback is required since WordPress 5.5, maybe if you update Yoast SEO the issue can get fixed, and if you can’t update, I’ll recommend disabling the WP_DEBUG from your wp-config.php file like this:
define('WP_DEBUG', false)
See REST API changes in WordPress 5.5 – section ‘permission_callback’
Add ‘permission_callback’ => ‘__return_true’ as argument to the function. Below are example code you can follow