woocommerce_is_email_preview

woocommerce_is_email_preview

Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_is_email_preview') is found 6 times:

  • /includes/emails/class-wc-email.php line 661
    		 *
    		 * @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 );
    		// Transient is used for live email preview without saving the settings.
    		if ( $is_email_preview ) {
    			$transient  = get_transient( "woocommerce_{$this->id}_email_type" );
    			$email_type = $transient ? $transient : $email_type;
    		}
    		return $email_type && class_exists( 'DOMDocument' ) ? $email_type : 'plain';
    
  • /includes/emails/class-wc-email.php line 1464
    		 *
    		 * @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;
    			}
    
  • /src/Internal/Features/FeaturesController.php line 1670
    		 *
    		 * @since 9.9.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 ) {
    			return get_transient( EmailPreview::TRANSIENT_PREVIEW_EMAIL_IMPROVEMENTS ) === 'yes';
    		}
    		return false;
    	}
    }
    
  • /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 50
    									 * 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 ( $email_improvements_enabled ) :
    										?>
    
  • /templates/emails/email-styles.php line 44
     *
     * @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' );
    

See this hook used in plugins: