Automattic\WooCommerce\Internal\StockNotifications\Emails

CustomerStockNotificationVerifiedEmail::prepare_email │ public │ WC 1.0

Prepares the email based on the notification data.

Метод класса: CustomerStockNotificationVerifiedEmail{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$CustomerStockNotificationVerifiedEmail = new CustomerStockNotificationVerifiedEmail();
$CustomerStockNotificationVerifiedEmail->prepare_email( $notification ): void;
$notification(Notification) (обязательный)
Notification.

Код CustomerStockNotificationVerifiedEmail::prepare_email() WC 11.2.2

public function prepare_email( Notification $notification ): void {
	$this->object                         = $notification;
	$this->recipient                      = $notification->get_user_email();
	$product                              = $notification->get_product();
	$this->placeholders['{product_name}'] = preg_replace( $this->plain_search, $this->plain_replace, $product->get_name() );
	$this->placeholders['{site_title}']   = preg_replace( $this->plain_search, $this->plain_replace, $this->get_blogname() );
}