Skip to content

Commit

Permalink
Subscriptions Block: Only check newsletter plans if on the wp-admin s…
Browse files Browse the repository at this point in the history
…ide (#36928)
  • Loading branch information
mreishus authored Apr 17, 2024
1 parent 6dd4d98 commit 3aab8c6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/update-subscription
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: other

Subscriptions Block: Only check newsletter plans if on the wp-admin side
Original file line number Diff line number Diff line change
Expand Up @@ -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' );
Expand Down

0 comments on commit 3aab8c6

Please sign in to comment.