Automattic\WooCommerce\Internal\Admin\Notes

MerchantEmailNotifications::send_merchant_notification()public staticWC 1.0

Send the notification to the merchant.

Method of the class: MerchantEmailNotifications{}

No Hooks.

Return

null. Nothing.

Usage

$result = MerchantEmailNotifications::send_merchant_notification( $note );
$note(object) (required)
The note to send.

MerchantEmailNotifications::send_merchant_notification() code WC 7.1.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 );
		}
	}
}