Skip to content

Commit b52a5b6

Browse files
manzoorwanijkmatticbot
authored andcommitted
Social | Publicize - Fix call to undefined method on WPCOM (#40328)
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/12011409642 Upstream-Ref: Automattic/jetpack@23cdd20
1 parent 5733559 commit b52a5b6

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ This is an alpha version! The changes listed here are not final.
1919
### Fixed
2020
- Fixed initial state error in the editor for simple sites
2121
- Publicize: fix page-detection util methods to stop unnecessary API calls to wp.com
22+
- Social | Publicize - Fixed call to undefined method on WPCOM
2223

2324
## [0.56.0] - 2024-11-18
2425
### Added

src/class-publicize-script-data.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ public static function get_store_initial_state() {
151151

152152
$share_status = array();
153153

154-
if ( Utils::should_block_editor_have_social() && $post ) {
154+
// get_post_share_status is not available on WPCOM yet.
155+
if ( Utils::should_block_editor_have_social() && $post && is_callable( array( self::publicize(), 'get_post_share_status' ) ) ) {
155156
$share_status[ $post->ID ] = self::publicize()->get_post_share_status( $post->ID );
156157
}
157158

0 commit comments

Comments
 (0)