diff --git a/projects/plugins/jetpack/changelog/update-subscription b/projects/plugins/jetpack/changelog/update-subscription new file mode 100644 index 0000000000000..00cd2cbe2ff0e --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-subscription @@ -0,0 +1,4 @@ +Significance: patch +Type: other + +Subscriptions Block: Only check newsletter plans if on the wp-admin side diff --git a/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php b/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php index efbc73a3252bb..61a99b4a12099 100644 --- a/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php +++ b/projects/plugins/jetpack/extensions/blocks/subscriptions/subscriptions.php @@ -163,7 +163,7 @@ function ( $allowed_meta ) { // Add a 'Newsletter' column to the Edit posts page // We only display the "Newsletter" column if we have configured the paid newsletter plan - if ( Jetpack_Memberships::has_configured_plans_jetpack_recurring_payments( 'newsletter' ) ) { + if ( defined( 'WP_ADMIN' ) && WP_ADMIN && Jetpack_Memberships::has_configured_plans_jetpack_recurring_payments( 'newsletter' ) ) { add_action( 'manage_post_posts_columns', __NAMESPACE__ . '\register_newsletter_access_column' ); add_action( 'manage_post_posts_custom_column', __NAMESPACE__ . '\render_newsletter_access_rows', 10, 2 ); add_action( 'admin_head', __NAMESPACE__ . '\newsletter_access_column_styles' );