Title: Deprecated REST Endpoint
Last modified: February 1, 2024

---

# Deprecated REST Endpoint

 *  Resolved [aapc](https://wordpress.org/support/users/aapc/)
 * (@aapc)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/)
 * After updating to v6.4.0 I’m seeing a bunch of warnings in my PHP log related
   to WPP. Here’s what I’m seeing:
 * _PHP Warning: The /wordpress-popular-posts/v1/popular-posts POST endpoint has
   been deprecated, please POST to /wordpress-popular-posts/v2/views/[ID] instead.
   in /xxxx/xxxx/xxxxxxx/xxxxxxxxxx.com/public/wp-content/plugins/wordpress-popular-
   posts/src/Rest/ViewLoggerEndpoint.php on line 91_
 * x’s were added for security 🙂
    -  This topic was modified 2 years, 3 months ago by [aapc](https://wordpress.org/support/users/aapc/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17391286)
 * Hi [@aapc](https://wordpress.org/support/users/aapc/),
 * That PHP warning is intentional, and will show up on your log if:
    - You have some custom JS code POSTing to /wordpress-popular-posts/v1/popular-
      posts to update views count, or
    - You’re using a caching plugin on your site and your site is serving an outdated
      version of wpp.min.js
 * If it’s the first one then you’ll need to update your JS code so POST requests
   are sent to /wordpress-popular-posts/v2/views/[ID] (where ID would be the post/
   page / CPT ID).
 * If you’re not running any custom code but you have a caching plugin installed
   on your site then clearing its cache should make sure that your site is serving
   the latest wpp.min.js script which does use the new endpoint.
 *  Thread Starter [aapc](https://wordpress.org/support/users/aapc/)
 * (@aapc)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17391347)
 * I had cleared the WP Rocket cache after updating the plugin but after clearing
   the cache from the hosting control panel, the warnings seem to have stopped. 
   Thanks for the help and I appreciate the quick response!
 *  [hykw](https://wordpress.org/support/users/hykw/)
 * (@hykw)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17397883)
 * Since src/Front/Front.php contains logic that accesses the following outdated
   URL, wouldn’t it constantly trigger a deprecated warning, even when the widget
   is simply being called as usual?
 * ‘ajax_url’ => esc_url_raw(rest_url(‘wordpress-popular-posts/v1/popular-posts’)),”
 *  Plugin Author [Hector Cabrera](https://wordpress.org/support/users/hcabrera/)
 * (@hcabrera)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17397894)
 * No, it won’t [@hykw](https://wordpress.org/support/users/hykw/). That is still
   in there on purpose as the referred endpoint has been _deprecated_, not _removed_(
   yet.) The only scenarios where that PHP warning might popup on your log are the
   ones I mentioned above.
 *  [hykw](https://wordpress.org/support/users/hykw/)
 * (@hykw)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17398067)
 * Thank you, I’ve found the reason, which was the browser cache.
 * Details:
   During the recent update (on my WordPress site, not in the plugin’s 
   logic), the assets/js/wpp.min.js file was updated. The obsolete file that was
   cached in the browser had pointed to /v1/. Clearing the browser cache has resolved
   the issue.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Deprecated REST Endpoint’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-popular-posts/assets/icon-256x256.png?rev=1232659)
 * [WP Popular Posts](https://wordpress.org/plugins/wordpress-popular-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-popular-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-popular-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-popular-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-popular-posts/reviews/)

## Tags

 * [php warnings](https://wordpress.org/support/topic-tag/php-warnings/)

 * 5 replies
 * 3 participants
 * Last reply from: [hykw](https://wordpress.org/support/users/hykw/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/deprecated-rest-endpoint/#post-17398067)
 * Status: resolved