WC_Emails::send_queued_transactional_emailpublic staticWC 1.0

Init the mailer instance and call the notifications for the current filter.

Метод класса: WC_Emails{}

Возвращает

null. Ничего (null).

Использование

$result = WC_Emails::send_queued_transactional_email( $filter, $args );
$filter(строка)
Filter name.
По умолчанию: ''
$args(массив)
Email args .
По умолчанию: [])

Код WC_Emails::send_queued_transactional_email() WC 10.4.3

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 );
	}
}