Skip to content

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

Open
npotier wants to merge 1 commit intolibreform:masterfrom
npotier:patch-1
Open

Add Permission Callback in order ton be compatible with WP latest version#179
npotier wants to merge 1 commit intolibreform:masterfrom
npotier:patch-1

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