Automattic\WooCommerce\Internal\Admin\EmailPreview
EmailPreview::get_dummy_product_when_not_set()
Return a dummy product when the product is not set in email classes.
Method of the class: EmailPreview{}
No Hooks.
Return
WC_Product
.
Usage
$EmailPreview = new EmailPreview(); $EmailPreview->get_dummy_product_when_not_set( $product );
- $product(WC_Product|null) (required)
- Order item product.
EmailPreview::get_dummy_product_when_not_set() EmailPreview::get dummy product when not set code WC 9.7.1
public function get_dummy_product_when_not_set( $product ) { if ( $product ) { return $product; } return $this->get_dummy_product(); }