WC_Emails::send_queued_transactional_email
Init the mailer instance and call the notifications for the current filter.
Method of the class: WC_Emails{}
Hooks from the method
Returns
null. Nothing (null).
Usage
$result = WC_Emails::send_queued_transactional_email( $filter, $args );
- $filter(string)
- Filter name.
Default:'' - $args(array)
- Email args .
Default:[])
WC_Emails::send_queued_transactional_email() WC Emails::send queued transactional email code WC 10.5.0
public static function send_queued_transactional_email( $filter = '', $args = array() ) {
/**
* Filter whether to allow sending queued transactional emails.
*
* @since 3.0.0
* @param bool $allow Whether to allow sending queued transactional emails.
* @param string $filter Filter name.
* @param array $args Email args.
*/
if ( apply_filters( 'woocommerce_allow_send_queued_transactional_email', true, $filter, $args ) ) {
self::instance(); // Init self so emails exist.
// Ensure gateways are loaded in case they need to insert data into the emails.
WC()->payment_gateways();
WC()->shipping();
// phpcs:disable WooCommerce.Commenting.CommentHooks.MissingSinceComment
/** This action is documented in includes/class-wc-emails.php in the send_transactional_email method. */
do_action_ref_array( $filter . '_notification', $args );
}
}