id ) { $templates = array_filter( $templates, function ( $template ) { return WooEmailTemplate::TEMPLATE_SLUG !== $template->slug; } ); } return $templates; } /** * Register WooCommerce email templates with the template registry. * * @param Templates_Registry $templates_registry The template registry instance. * @return Templates_Registry */ 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; } }