Automattic\WooCommerce\Internal\StockNotifications\Emails

EmailManager::initpublicWC 1.0

Initialize the emails.

Method of the class: EmailManager{}

No Hooks.

Returns

null. Nothing (null).

Usage

$EmailManager = new EmailManager();
$EmailManager->init();

EmailManager::init() code WC 10.3.6

final public function init() {

	// Setup email hooks & handlers.
	add_filter( 'woocommerce_email_classes', array( $this, 'email_classes' ) );

	// Add "transactional" emails.
	add_action( 'woocommerce_email_actions', array( $this, 'add_transactional_emails' ) );

	// Setup styles.
	add_filter( 'woocommerce_email_styles', array( $this, 'add_stylesheets' ), 10, 2 );

	// Preview.
	add_filter( 'woocommerce_prepare_email_for_preview', array( $this, 'prepare_email_for_preview' ) );
	add_filter( 'woocommerce_email_preview_email_content_setting_ids', array( $this, 'add_intro_content_to_preview_settings' ), 10, 2 );

	// Restore customer's context while rendering the emails.
	add_action( 'woocommerce_email_stock_notification_product', array( $this, 'maybe_restore_customer_tax_location_data' ), 9 );

	// Register email templates.
	$container = wc_get_container();
	$container->get( EmailTemplatesController::class );
}