Skip to content

Commit

Permalink
Stats: Fix posts endpoint on atomic (#36039)
Browse files Browse the repository at this point in the history
* only v1.1 works for posts endpoint

* changelog

* fix up project versions
  • Loading branch information
kangzj committed Feb 28, 2024
1 parent 9cc1515 commit cdfe455
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fixed

Stats: fix posts endpoint for Atomic sites
2 changes: 1 addition & 1 deletion projects/packages/stats-admin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@automattic/jetpack-stats-admin",
"version": "0.16.1",
"version": "0.16.2-alpha",
"description": "Stats Dashboard",
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/packages/stats-admin/#readme",
"bugs": {
Expand Down
2 changes: 1 addition & 1 deletion projects/packages/stats-admin/src/class-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class Main {
/**
* Stats version.
*/
const VERSION = '0.16.1';
const VERSION = '0.16.2-alpha';

/**
* Singleton Main instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public function get_site_posts( $req ) {
$params = array_merge( array( 'force' => 'wpcom' ), $req->get_params() );
$response = wp_remote_get(
sprintf(
'%s/rest/v1.2/sites/%d/posts?%s',
'%s/rest/v1.1/sites/%d/posts?%s',
Constants::get_constant( 'JETPACK__WPCOM_JSON_API_BASE' ),
Jetpack_Options::get_option( 'id' ),
$req->get_param( 'resource_id' ),
Expand Down

0 comments on commit cdfe455

Please sign in to comment.