WC_Email::__construct()
Constructor.
Method of the class: WC_Email{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WC_Email = new WC_Email(); $WC_Email->__construct();
WC_Email::__construct() WC Email:: construct code WC 9.7.1
public function __construct() { // Find/replace. $this->placeholders = array_merge( array( '{site_title}' => $this->get_blogname(), '{site_address}' => wp_parse_url( home_url(), PHP_URL_HOST ), '{site_url}' => wp_parse_url( home_url(), PHP_URL_HOST ), '{store_email}' => $this->get_from_address(), ), $this->placeholders ); // Init settings. $this->init_form_fields(); $this->init_settings(); // Default template base if not declared in child constructor. if ( is_null( $this->template_base ) ) { $this->template_base = WC()->plugin_path() . '/templates/'; } $this->email_type = $this->get_option( 'email_type' ); $this->enabled = $this->get_option( 'enabled' ); add_action( 'phpmailer_init', array( $this, 'handle_multipart' ) ); add_action( 'woocommerce_update_options_email_' . $this->id, array( $this, 'process_admin_options' ) ); }