Automattic\WooCommerce\Internal\StockNotifications\Emails
EmailTemplatesController::email_product_price
Email product price.
Метод класса: EmailTemplatesController{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$EmailTemplatesController = new EmailTemplatesController(); $EmailTemplatesController->email_product_price( $product, $notification, $plain_text );
- $product(WC_Product) (обязательный)
- The product object.
- $notification(Notification) (обязательный)
- The notification object.
- $plain_text(true|false)
- Whether the email is plain text.
По умолчанию:false
Код EmailTemplatesController::email_product_price() EmailTemplatesController::email product price WC 11.2.2
<?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 );
}