woocommerce_email_preview_dummy_product filter-hookWC 9.6.0

A dummy WC_Product used in email preview.

Usage

add_filter( 'woocommerce_email_preview_dummy_product', 'wp_kama_woocommerce_email_preview_dummy_product_filter', 10, 2 );

/**
 * Function for `woocommerce_email_preview_dummy_product` filter-hook.
 * 
 * @param WC_Product $product    The dummy product object.
 * @param string     $email_type The email type to preview.
 *
 * @return WC_Product
 */
function wp_kama_woocommerce_email_preview_dummy_product_filter( $product, $email_type ){

	// filter...
	return $product;
}
$product(WC_Product)
The dummy product object.
$email_type(string)
The email type to preview.

Changelog

Since 9.6.0 Introduced.

Where the hook is called

EmailPreview::get_dummy_product()
woocommerce_email_preview_dummy_product
woocommerce/src/Internal/Admin/EmailPreview/EmailPreview.php 304
return apply_filters( 'woocommerce_email_preview_dummy_product', $product, $this->email_type );

Where the hook is used in WooCommerce

Usage not found.