Skip to content

Commit

Permalink
Newsletter: Fix class not found error (#39765)
Browse files Browse the repository at this point in the history
  • Loading branch information
lezama authored Oct 15, 2024
1 parent cd86cc6 commit 85cc267
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-class-not-found-error
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Fix Fatal Error: Class 'Jetpack_Subscriptions_Widget' not found during REST API
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ function render_block( $attributes ) {
Jetpack_Gutenberg::load_styles_as_required( FEATURE_NAME );
}

if ( ! class_exists( 'Jetpack_Subscriptions_Widget' ) ) {
return '';
}

$subscribe_email = Jetpack_Memberships::get_current_user_email();

/** This filter is documented in \Automattic\Jetpack\Forms\ContactForm\Contact_Form */
Expand Down

0 comments on commit 85cc267

Please sign in to comment.