WC_Emails::init_transactional_emails()
Hook in all transactional emails.
Method of the class: WC_Emails{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$result = WC_Emails::init_transactional_emails();
WC_Emails::init_transactional_emails() WC Emails::init transactional emails code WC 9.4.2
public static function init_transactional_emails() { $email_actions = apply_filters( 'woocommerce_email_actions', array( 'woocommerce_low_stock', 'woocommerce_no_stock', 'woocommerce_product_on_backorder', 'woocommerce_order_status_pending_to_processing', 'woocommerce_order_status_pending_to_completed', 'woocommerce_order_status_processing_to_cancelled', 'woocommerce_order_status_pending_to_failed', 'woocommerce_order_status_pending_to_on-hold', 'woocommerce_order_status_failed_to_processing', 'woocommerce_order_status_failed_to_completed', 'woocommerce_order_status_failed_to_on-hold', 'woocommerce_order_status_cancelled_to_processing', 'woocommerce_order_status_cancelled_to_completed', 'woocommerce_order_status_cancelled_to_on-hold', 'woocommerce_order_status_on-hold_to_processing', 'woocommerce_order_status_on-hold_to_cancelled', 'woocommerce_order_status_on-hold_to_failed', 'woocommerce_order_status_completed', 'woocommerce_order_fully_refunded', 'woocommerce_order_partially_refunded', 'woocommerce_new_customer_note', 'woocommerce_created_customer', ) ); if ( apply_filters( 'woocommerce_defer_transactional_emails', false ) ) { self::$background_emailer = new WC_Background_Emailer(); foreach ( $email_actions as $action ) { add_action( $action, array( __CLASS__, 'queue_transactional_email' ), 10, 10 ); } } else { foreach ( $email_actions as $action ) { add_action( $action, array( __CLASS__, 'send_transactional_email' ), 10, 10 ); } } }