Automattic\WooCommerce\Internal\Admin\Notes
MerchantEmailNotifications::send_merchant_notification()
Send the notification to the merchant.
Метод класса: MerchantEmailNotifications{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = MerchantEmailNotifications::send_merchant_notification( $note );
- $note(объект) (обязательный)
- The note to send.
Код MerchantEmailNotifications::send_merchant_notification() MerchantEmailNotifications::send merchant notification WC 9.8.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 ); } } }