woocommerce_is_email_preview
woocommerce_is_email_preview
Appears in: woocommerce.9.7.0, woocommerce.9.7.1
Hook Type: filter
See hook in action
Displaying hooks found in version: woocommerce.9.7.1apply_filters('woocommerce_is_email_preview') is found 4 times:
- /includes/emails/class-wc-email.php line 1237
* * @since 9.6.0 * @param bool $is_email_preview Whether the email is being previewed. */ $is_email_preview = apply_filters( 'woocommerce_is_email_preview', false ); if ( $is_email_preview ) { $email_id = $this->id; $transient = get_transient( "woocommerce_{$email_id}_{$key}" ); if ( false !== $transient ) { $option = $transient ? $transient : $empty_value; }
- /templates/emails/email-footer.php line 50
* This filter is documented in templates/emails/email-styles.php * * @since 9.6.0 */ if ( apply_filters( 'woocommerce_is_email_preview', false ) ) { $text_transient = get_transient( 'woocommerce_email_footer_text' ); $email_footer_text = false !== $text_transient ? $text_transient : $email_footer_text; } echo wp_kses_post( wpautop( wptexturize(
- /templates/emails/email-header.php line 51
* This filter is documented in templates/emails/email-styles.php * * @since 9.6.0 */ if ( apply_filters( 'woocommerce_is_email_preview', false ) ) { $img_transient = get_transient( 'woocommerce_email_header_image' ); $img = false !== $img_transient ? $img_transient : $img; } if ( $img ) { echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>';
- /templates/emails/email-styles.php line 43
* * @since 9.6.0 * @param bool $is_email_preview Whether the email is being previewed. */ $is_email_preview = apply_filters( 'woocommerce_is_email_preview', false ); if ( $is_email_preview ) { $bg_transient = get_transient( 'woocommerce_email_background_color' ); $body_transient = get_transient( 'woocommerce_email_body_background_color' ); $base_transient = get_transient( 'woocommerce_email_base_color' ); $text_transient = get_transient( 'woocommerce_email_text_color' );