Automattic\WooCommerce\Internal\Admin\Notes
MerchantEmailNotifications::send_merchant_notification()
Send the notification to the merchant.
Method of the class: MerchantEmailNotifications{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = MerchantEmailNotifications::send_merchant_notification( $note );
- $note(object) (required)
- The note to send.
MerchantEmailNotifications::send_merchant_notification() MerchantEmailNotifications::send merchant notification code WC 9.7.1
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 ); } } }