Automattic\WooCommerce\Internal\Admin\Notes
MerchantEmailNotifications::run()
Send all the notifications type email.
Method of the class: MerchantEmailNotifications{}
No Hooks.
Return
null
. Nothing (null).
Usage
$result = MerchantEmailNotifications::run();
MerchantEmailNotifications::run() MerchantEmailNotifications::run code WC 9.7.1
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(); } } }