woocommerce_is_email_preview, false

woocommerce_is_email_preview, false

Appears in:
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.11.0.0

apply_filters('woocommerce_is_email_preview, false') is found 11 times:

  • /includes/emails/class-wc-email-customer-fulfillment-created.php line 220
    			 * Filter to determine if this is an email preview.
    			 *
    			 * @since 9.8.0
    			 */
    			$is_email_preview = apply_filters( 'woocommerce_is_email_preview', false );
    			if ( $is_email_preview ) {
    				// If this is a preview, we need to set up a dummy fulfillment object.
    				$this->fulfillment = new Fulfillment();
    				$this->fulfillment->set_items(
    					array_map(
    						function ( $item ) {
    
  • /includes/emails/class-wc-email-customer-fulfillment-deleted.php line 193
    			 * Filter to determine if this is an email preview.
    			 *
    			 * @since 9.8.0
    			 */
    			$is_email_preview = apply_filters( 'woocommerce_is_email_preview', false );
    			if ( $is_email_preview ) {
    				// If this is a preview, we need to set up a dummy fulfillment object.
    				$this->fulfillment = new Fulfillment();
    				$this->fulfillment->set_items(
    					array_map(
    						function ( $item ) {
    
  • /includes/emails/class-wc-email-customer-fulfillment-updated.php line 205
    			 * Filter to determine if this is an email preview.
    			 *
    			 * @since 9.8.0
    			 */
    			$is_email_preview = apply_filters( 'woocommerce_is_email_preview', false );
    			if ( $is_email_preview ) {
    				// If this is a preview, we need to set up a dummy fulfillment object.
    				$this->fulfillment = new Fulfillment();
    				$this->fulfillment->set_items(
    					array_map(
    						function ( $item ) {
    
  • /includes/emails/class-wc-email.php line 743
    		 *
    		 * @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 1770
    		 *
    		 * @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 ) {
    			$plugin_id = $this->plugin_id;
    			$email_id  = $this->id;
    			$transient = get_transient( "{$plugin_id}{$email_id}_{$key}" );
    			if ( false !== $transient ) {
    				$option = $transient ? $transient : $empty_value;
    
  • /src/Internal/Admin/EmailPreview/EmailPreview.php line 735
    		 * @since 9.6.0
    		 *
    		 * @param bool $is_email_preview Whether preview mode is active.
    		 */
    		if ( apply_filters( 'woocommerce_is_email_preview', false ) ) {
    			return true;
    		}
    		return $is_downloadable;
    	}
    
    	/**
    
  • /src/Internal/Admin/EmailPreview/EmailPreview.php line 758
    		 * @since 9.6.0
    		 *
    		 * @param bool $is_email_preview Whether preview mode is active.
    		 */
    		if ( apply_filters( 'woocommerce_is_email_preview', false ) ) {
    			$dummy_file = new WC_Product_Download();
    			$dummy_file->set_id( 'preview-dummy' );
    			$dummy_file->set_name( __( 'Sample Download File.pdf', 'woocommerce' ) );
    			$dummy_file->set_file( 'sample-download.pdf' );
    			return $dummy_file;
    		}
    
  • /src/Internal/Features/FeaturesController.php line 2182
    		 *
    		 * @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 53
    															 * 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 61
    									 * 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 45
     *
     * @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' );