Ever since we upgraded to CiviCRM 5.28.0, one of our sites is getting several error messages like this:

Notice: register_rest_route was called incorrectly. The REST API route definition for civicrm/v3/url 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.) in [site path]/wp-includes/functions.php on line 5225

There are eight error messages in total, all identical other than naming other civicrm/v3/* route names.

This is on WordPress. The core files and all plugins are at the latest versions, and the errors persist after we just updated to CiviCRM 5.28.3.

So far, Google has not revealed anything useful.

What might cause this problem?


2 Answers 2


Don't panic, the issue you are seeing is only a notice, not an error and won't stop CiviCRM working.

In WordPress 5.5, a change was made to how REST routes are registered and now required a permission_callback. For the moment, the plugin will continue to work and once the plugin author releases an update that adds the permission_callback, the notice will disappear.

The reason you may see it the notice on one site and not all is that notices only appear when WordPress is run in DEBUG mode, confirm by checking the value of wp-config.php for

define( 'WP_DEBUG', true );

If the site showing the notices should not be in debug mode, simply change the value of WP_DEBUG to false.

  • Great, thanks! Good to know that it is benign. And yes, we had debug on for another reason. It's off now, and the messages are gone. Sep 8, 2020 at 17:55

search for civicrm/v3 set 'permission_callback' => => function() { return true; } after callback **more info : **https://developer.wordpress.org/reference/functions/register_rest_route/

  • Could you explain and format your answer for better readability?
    – nielo
    Jul 14, 2021 at 12:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.