Automattic\WooCommerce\Internal\EmailEditor\EmailTemplates

TemplatesController::initpublicWC 1.0

Initialize the controller by registering hooks.

Method of the class: TemplatesController{}

No Hooks.

Returns

null. Nothing (null).

Usage

$TemplatesController = new TemplatesController();
$TemplatesController->init(): void;

TemplatesController::init() code WC 10.4.3

final public function init(): void {
	add_filter( 'woocommerce_email_editor_register_templates', array( $this, 'register_templates' ) );
	// Priority 100 ensures this runs last to remove email templates from the Site Editor.
	add_filter( 'get_block_templates', array( $this, 'filter_email_templates' ), 100, 1 );
}