Automattic\WooCommerce\Internal\Admin\Notes
MerchantEmailNotifications::get_notification_recipients()
Get users by role to notify.
Method of the class: MerchantEmailNotifications{}
No Hooks.
Return
Array
. Users to notify
Usage
$result = MerchantEmailNotifications::get_notification_recipients( $note );
- $note(object) (required)
- The note to send.
MerchantEmailNotifications::get_notification_recipients() MerchantEmailNotifications::get notification recipients code WC 9.8.2
public static function get_notification_recipients( $note ) { $content_data = $note->get_content_data(); $role = 'administrator'; if ( isset( $content_data->role ) ) { $role = $content_data->role; } $args = array( 'role' => $role ); return get_users( $args ); }