woocommerce_email_preview_dummy_downloadable_product
A dummy downloadable WC_Product used in email preview.
Usage
add_filter( 'woocommerce_email_preview_dummy_downloadable_product', 'wp_kama_woocommerce_email_preview_dummy_downloadable_product_filter', 10, 2 );
/**
* Function for `woocommerce_email_preview_dummy_downloadable_product` filter-hook.
*
* @param WC_Product $product The dummy downloadable product object.
* @param string $email_type The email type to preview.
*
* @return WC_Product
*/
function wp_kama_woocommerce_email_preview_dummy_downloadable_product_filter( $product, $email_type ){
// filter...
return $product;
}
- $product(WC_Product)
- The dummy downloadable product object.
- $email_type(string)
- The email type to preview.
Changelog
| Since 10.3.0 | Introduced. |
Where the hook is called
woocommerce_email_preview_dummy_downloadable_product
woocommerce/src/Internal/Admin/EmailPreview/EmailPreview.php 557
return apply_filters( 'woocommerce_email_preview_dummy_downloadable_product', $product, $this->email_type );