Answers.Body: <p><strong>search for civicrm/v3</strong>
  <strong>set</strong> 'permission_callback' =&gt; =&gt; function() { return true; }
  <strong>after callback</strong>
  **more info : **<a href="https://developer.wordpress.org/reference/functions/register_rest_route/" rel="nofollow noreferrer">https://developer.wordpress.org/reference/functions/register_rest_route/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-14T12:00:02.967Z
Answers.Text: Could you explain and format your answer for better readability?
Answers.UserDisplayName: nielo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-13T11:47:55.880Z
Answers.LastActivityDate: 2021-07-15T13:17:02.623Z
Answers.LastEditDate: 2021-07-15T13:17:02.623Z
Answers.UserDisplayName: Mohmmed Alagha
Answers.Body: <p>Don't panic, the issue you are seeing is only a notice, not an error and won't stop CiviCRM working.</p>
  <p>In WordPress 5.5, a change was made to <a href="https://developer.wordpress.org/rest-api/extending-the-rest-api/adding-custom-endpoints/" rel="nofollow noreferrer">how REST routes are registered</a> and now required a <strong>permission_callback</strong>. For the moment, the plugin will continue to work and once the plugin author releases an update that adds the <strong>permission_callback</strong>, the notice will disappear.</p>
  <p>The reason you may see it the notice on one site and not all is that notices only appear when WordPress is run in <strong>DEBUG</strong> mode, confirm by checking the value of
  wp-config.php for</p>
  <pre><code>define( 'WP_DEBUG', true );
  </code></pre>
  <p>If the site showing the notices should not be in <a href="https://codex.wordpress.org/Debugging_in_WordPress" rel="nofollow noreferrer">debug mode</a>, simply change the value of WP_DEBUG to false.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-08T17:55:27.143Z
Answers.Text: 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.
Answers.UserDisplayName: RiverRunner
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-09-02T11:30:21.527Z
Answers.LastActivityDate: 2020-09-02T11:30:21.527Z
Answers.UserDisplayName: S.Walsh
Body: <p>Ever since we upgraded to CiviCRM 5.28.0, one of our sites is getting several error messages like this:</p>
  <blockquote>
  <p>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</p>
  </blockquote>
  <p>There are eight error messages in total, all identical other than naming other civicrm/v3/* route names.</p>
  <p>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.</p>
  <p>So far, Google has not revealed anything useful.</p>
  <p>What might cause this problem?</p>
  <p>Thanks!</p>
  
Tags: <wordpress><error>
Title: Problem with register_rest_route call since 5.28.0: missing the required permission_callback argument
ThreadText: # Problem with register_rest_route call since 5.28.0: missing the required permission_callback argument
  
  (Asked by: username_0 on 2020-08-23)
  
  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?
  
  Thanks!
  
  **Tags:** wordpress, error
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2020-09-02. Score: 4 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_1 on 2021-07-13. Score: 0
  
  **search for civicrm/v3**
  **set** 'permission\_callback' => => function() { return true; }
  **after callback**
  \*\*more info : \*\*<https://developer.wordpress.org/reference/functions/register_rest_route/>
  
  > **Comments:**
  > **username_2**: Could you explain and format your answer for better readability?  
  
  ---
  
  