From 8e4dd7cf5ebc0d94435f1eccdf4a9c3189456188 Mon Sep 17 00:00:00 2001 From: Manzoor Wani Date: Wed, 25 Dec 2024 21:09:43 -0800 Subject: [PATCH] Fix connection test API path for WoA sites (#40732) --- .../packages/publicize/changelog/fix-connection-tests-for-woa | 4 ++++ .../packages/publicize/src/class-publicize-script-data.php | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 projects/packages/publicize/changelog/fix-connection-tests-for-woa diff --git a/projects/packages/publicize/changelog/fix-connection-tests-for-woa b/projects/packages/publicize/changelog/fix-connection-tests-for-woa new file mode 100644 index 0000000000000..b22e664642a15 --- /dev/null +++ b/projects/packages/publicize/changelog/fix-connection-tests-for-woa @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Social: Ensure that broken connection notices work fine on WoA sites diff --git a/projects/packages/publicize/src/class-publicize-script-data.php b/projects/packages/publicize/src/class-publicize-script-data.php index b4e7dded6b62d..6f18e8b9b696d 100644 --- a/projects/packages/publicize/src/class-publicize-script-data.php +++ b/projects/packages/publicize/src/class-publicize-script-data.php @@ -236,9 +236,9 @@ public static function get_supported_services() { */ public static function get_api_paths() { - $is_simple_site = ( new Host() )->is_wpcom_simple(); + $is_wpcom = ( new Host() )->is_wpcom_platform(); - if ( $is_simple_site ) { + if ( $is_wpcom ) { return array( 'refreshConnections' => '/wpcom/v2/publicize/connection-test-results', 'resharePost' => '/wpcom/v2/posts/{postId}/publicize',