The register_rest_route function was called incorrectly. REST API paths must be registered using the rest_api_init action.
Hello.
If I activate the plugin, an error occurs on all pages below, please help solve the problem:
Notice: The register_rest_route function was called incorrectly. REST API paths must be registered using the rest_api_init action. More information can be found on the WordPress Debugging page. (This message was added in version 5.1.0.) In ..public_html/wp-includes/functions.php on line 4773
Notice: The register_rest_route function was called incorrectly. REST API paths must be registered using the rest_api_init action. More information can be found on the WordPress Debugging page. (This message was added in version 5.1.0.) In ..public_html/wp-includes/functions.php on line 4773