Skip to content

Commit

Permalink
Subscribe Block: Remove call to dotcom from the frontend when renderi…
Browse files Browse the repository at this point in the history
…ng subscribe block in modal if we don't need it (#39362)
  • Loading branch information
lezama authored Sep 11, 2024
1 parent 11ebad6 commit 8de48fd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: other
Comment: Reduces number of calls to wpcom for fetching subscribers counts


Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ function render_block( $attributes ) {
esc_html__( "Success! An email was just sent to confirm your subscription. Please find the email now and click 'Confirm' to start subscribing.", 'jetpack' )
),
'show_subscribers_total' => (bool) get_attribute( $attributes, 'showSubscribersTotal' ),
'subscribers_total' => get_subscriber_count( $include_social_followers ),
'subscribers_total' => get_attribute( $attributes, 'showSubscribersTotal' ) ? get_subscriber_count( $include_social_followers ) : 0,
'referer' => esc_url_raw(
( is_ssl() ? 'https' : 'http' ) . '://' . ( isset( $_SERVER['HTTP_HOST'] ) ? wp_unslash( $_SERVER['HTTP_HOST'] ) : '' ) .
( isset( $_SERVER['REQUEST_URI'] ) ? wp_unslash( $_SERVER['REQUEST_URI'] ) : '' )
Expand Down

0 comments on commit 8de48fd

Please sign in to comment.