Automattic\WooCommerce\Internal\Admin\Notes
MerchantEmailNotifications::run()
Send all the notifications type email.
Метод класса: MerchantEmailNotifications{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$result = MerchantEmailNotifications::run();
Код MerchantEmailNotifications::run() MerchantEmailNotifications::run WC 9.6.0
public static function run() { $data_store = Notes::load_data_store(); $notes = $data_store->get_notes( array( 'type' => array( Note::E_WC_ADMIN_NOTE_EMAIL ), 'status' => array( 'unactioned' ), ) ); foreach ( $notes as $note ) { $note = Notes::get_note( $note->note_id ); if ( $note ) { self::send_merchant_notification( $note ); $note->set_status( 'sent' ); $note->save(); } } }