Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Permission Callback in order ton be compatible with WP latest version #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

npotier
Copy link

@npotier npotier commented Dec 12, 2020

This is due to the recent change in WordPress Core: https://make.wordpress.org/core/2020/07/22/rest-api-changes-in-wordpress-5-5/

If permission_callback argument is not given, the following error will occur :

Notice: register_rest_route was called incorrectly. The REST API route definition for wplf/v1/submit is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)

This is due to the recent change in WordPress Core: https://make.wordpress.org/core/2020/07/22/rest-api-changes-in-wordpress-5-5/

If permission_callback argument is not given, the following error will occur : 

Notice: register_rest_route was called incorrectly. The REST API route definition for wplf/v1/submit is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant