WC_Emails::__construct()
Constructor for the email class hooks in all emails that can be sent.
Method of the class: WC_Emails{}
Hooks from the method
Return
null
. Nothing (null).
Usage
$WC_Emails = new WC_Emails(); $WC_Emails->__construct();
WC_Emails::__construct() WC Emails:: construct code WC 9.6.1
public function __construct() { $this->init(); // Email Header, Footer and content hooks. add_action( 'woocommerce_email_header', array( $this, 'email_header' ) ); add_action( 'woocommerce_email_footer', array( $this, 'email_footer' ) ); add_action( 'woocommerce_email_order_details', array( $this, 'order_downloads' ), 10, 4 ); add_action( 'woocommerce_email_order_details', array( $this, 'order_details' ), 10, 4 ); add_action( 'woocommerce_email_order_meta', array( $this, 'order_meta' ), 10, 3 ); add_action( 'woocommerce_email_customer_details', array( $this, 'customer_details' ), 10, 3 ); add_action( 'woocommerce_email_customer_details', array( $this, 'email_addresses' ), 20, 3 ); add_action( 'woocommerce_email_customer_details', array( $this, 'additional_checkout_fields' ), 30, 3 ); add_action( 'woocommerce_email_customer_address_section', array( $this, 'additional_address_fields' ), 30, 4 ); // Hooks for sending emails during store events. add_action( 'woocommerce_low_stock_notification', array( $this, 'low_stock' ) ); add_action( 'woocommerce_no_stock_notification', array( $this, 'no_stock' ) ); add_action( 'woocommerce_product_on_backorder_notification', array( $this, 'backorder' ) ); add_action( 'woocommerce_created_customer_notification', array( $this, 'customer_new_account' ), 10, 3 ); // Hook for replacing {site_title} in email-footer. add_filter( 'woocommerce_email_footer_text', array( $this, 'replace_placeholders' ) ); // Let 3rd parties unhook the above via this hook. do_action( 'woocommerce_email', $this ); }