Register a custom email template

Register a template slug and its directory. Create the corresponding template files in the supplied path before selecting the template in a workflow.

Developer note:

Add custom PHP in a small custom plugin or child theme, and test it on a staging site before production. This example requires ongoing maintenance when extension APIs change.

functions.php

<?php

add_filter( 'automatewoo_email_templates', 'my_store_automatewoo_email_templates' );

/**
 * Register a custom AutomateWoo email template.
 *
 * @param array $templates Registered templates.
 * @return array
 */
function my_store_automatewoo_email_templates( $templates ) {
	$templates['my-store'] = array(
		'template_name' => __( 'My Store email', 'my-store' ), // phpcs:ignore WordPress.WP.I18n.TextDomainMismatch
		'from_name'     => 'My Store',
		'from_email'    => 'email@example.org',
		'path'          => __DIR__ . '/templates/my-store',
	);

	return $templates;
}
Use of your personal data
We and our partners process your personal data (such as browsing data, IP Addresses, cookie information, and other unique identifiers) based on your consent and/or our legitimate interest to optimize our website, marketing activities, and your user experience.