Automattic\WooCommerce\Internal\Admin\Notes

MerchantEmailNotifications::send_merchant_notification()public staticWC 1.0

Send the notification to the merchant.

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

Хуков нет.

Возвращает

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

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

$result = MerchantEmailNotifications::send_merchant_notification( $note );
$note(объект) (обязательный)
The note to send.

Код MerchantEmailNotifications::send_merchant_notification() WC 8.7.0

public static function send_merchant_notification( $note ) {
	\WC_Emails::instance();
	$users = self::get_notification_recipients( $note );
	$email = new EmailNotification( $note );
	foreach ( $users as $user ) {
		if ( is_email( $user->user_email ) ) {
			$name = self::get_merchant_preferred_name( $user );
			$email->trigger( $user->user_email, $user->ID, $name );
		}
	}
}