libreform / wp-libre-form

Easy native HTML5 forms for WordPress. Version 1.5 is unmaintained, but works without issue. 2.0 has been rewritten from the ground, and can be found at https://github.com/libreform/libreform
https://wordpress.org/plugins/wp-libre-form
GNU General Public License v3.0
67 stars 27 forks source link

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

Open npotier opened 3 years ago

npotier commented 3 years ago

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.)