Automattic\WooCommerce\Internal\EmailEditor\EmailTemplates
TemplatesController::register_templates()
Register WooCommerce email templates with the template registry.
Метод класса: TemplatesController{}
Хуков нет.
Возвращает
Templates_Registry
.
Использование
$TemplatesController = new TemplatesController(); $TemplatesController->register_templates( $templates_registry );
- $templates_registry(Templates_Registry) (обязательный)
- The template registry instance.
Код TemplatesController::register_templates() TemplatesController::register templates WC 9.8.1
public function register_templates( Templates_Registry $templates_registry ) { $templates = array(); $templates[] = new WooEmailTemplate(); foreach ( $templates as $template ) { $the_template = new Template( $this->template_prefix, $template->get_slug(), $template->get_title(), $template->get_description(), $template->get_content(), array( Integration::EMAIL_POST_TYPE ) ); $templates_registry->register( $the_template ); } return $templates_registry; }