Automattic\WooCommerce\Internal\EmailEditor\EmailTemplates
TemplatesController::init
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() 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 );
}