Automattic\WooCommerce\Internal\StockNotifications\Emails

EmailTemplatesController::email_product_pricepublicWC 1.0

Email product price.

Method of the class: EmailTemplatesController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$EmailTemplatesController = new EmailTemplatesController();
$EmailTemplatesController->email_product_price( $product, $notification, $plain_text );
$product(WC_Product) (required)
The product object.
$notification(Notification) (required)
The notification object.
$plain_text(true|false)
Whether the email is plain text.
Default: false

EmailTemplatesController::email_product_price() code WC 10.3.6

<?php
public function email_product_price( $product, $notification, $plain_text = false ) {
	if ( $plain_text ) {
		return;
	}

	ob_start();
	?>
	<div id="notification__product__price"><?php echo wp_kses_post( $product->get_price_html() ); ?></div>
	<?php
	$html = ob_get_clean();
	echo wp_kses_post( $html );
}