Variable Listing

PLEASE NOTE – As of version 2.4 this documentation has been moved to become a part of the plugin itself and has not been updated since.

user.id

Displays the ID of the user.

Example
									{{ user.id }}
								
user.email

Displays the user’s email address. Note: You can use this variable in the To field when sending emails.

Example
									{{ user.email }}
								
user.username

Displays the user’s username.

Example
									{{ user.username }}
								
user.firstname

Displays the user’s first name.

Example
									Dear {{ user.firstname | default : customer }},
								
Parameters
defaultFallback if the user has not entered their first name.
user.lastname

Display’s the users last name.

Example
									{{ user.lastname }}
								
user.meta

Displays a meta field.

Example
									{{ user.meta | key : billing_phone, default : No phone number found. }}
								
Parameters
keyThe corresponding meta_key of the field you would like to display.(Required)
defaultFallback if the field is not found or is empty.
user.generate_coupon

Creates a unique coupon that is restricted to the user’s email. To use you need to first create a template coupon which is exactly like creating a normal coupon. it might be helpful to prefix it with the word ‘template’.

  • NOTE: You can leave the template coupon as a draft so it can’t be used
Example
									{{ user.generate_coupon | template : TEMPLATE-10-OFF, expires : 7 }}
								
Parameters
templateName of the coupon that will be cloned.(Required)
expiresNumber of days the coupon will be valid for.
prefixThe prefix for the coupon code, defaults to 'aw-'.
guest.email
Example
									{{ guest.email }}
								
guest.generate_coupon

See {{ user.generate_coupon }}

Example
									{{ guest.generate_coupon | template : TEMPLATE-10-OFF, expires : 7 }}
								
order.id

Displays the order’s unique id. Also known as the order number.

Example
									{{ order.id }}
								
order.number

Displays the order number.

Example
									{{ order.number }}
								
order.meta

Displays an order’s meta field.

Example
									{{ order.meta | key : custom_field_name }}
								
Parameters
keyThe corresponding meta_key of the field you would like to display.(Required)
defaultFallback if the field is not found or is empty.
order.cross_sells

Displays a product listing of cross sells based on the items in an order. Be sure to set up cross sells before using

Default template: product-grid-2-col.php

Example
									{{ order.cross_sells | template: product-grid-3-col.php }}
								
Parameters
templateIncluded templates: product-grid-2-col.php, product-grid-3-col.php, product-rows.php.
To override or add new templates use directory: /% your theme %/automatewoo/email/
order.items

Displays a product listing of items in an order.

Default template: product-grid-2-col.php

Example
									{{ order.items | template: product-grid-3-col.php }}
								
Parameters
templateIncluded templates: product-grid-2-col.php, product-grid-3-col.php, product-rows.php.
To override or add new templates use directory: /% your theme %/automatewoo/email/
order.itemscount

Displays the number of items in the order.

Example
									{{ order.itemscount }}
								
order.total

Displays the total of the order.

Example
									{{ order.total }}
								
order.status

Displays the status of the order.

Example
									{{ order.status }}
								
cart.items

Display a product listing of the items in the cart.

Default template: product-grid-2-col.php

Example
									{{ cart.items | template: product-grid-3-col.php }}
								
Parameters
templateIncluded templates: product-grid-2-col.php, product-grid-3-col.php, product-rows.php.
To override or add new templates use directory: /% your theme %/automatewoo/email/
cart.link

Displays a link to the cart page.

Example
									{{ cart.link }}
								
cart.total

Displays the formatted total of the cart.

Example
									{{ cart.total }}
								
wishlist.view_link

Displays a link to a Wishlist.

Example
									<a href="{{ wishlist.view_link }}">View wishlisth</a>
								
wishlist.items

Display a product listing of the items in the Wishlist.

Default template: product-grid-2-col.php

Example
									{{ wishlist.items | template: product-grid-3-col.php }}
								
Parameters
templateIncluded templates: product-grid-2-col.php, product-grid-3-col.php, product-rows.php.
To override or add new templates use directory: /% your theme %/automatewoo/email/
wishlist.itemscount

Displays the number of items in the wishlist.

Example
									{{ wishlist.itemscount }}
								
order_item.attribute

Can be used to display the attribute term name when a customer orders a variable product.

Example
									{{ order_item.attribute | slug: location }}
								
Parameters
slugThe slug of the product attribute.(Required)
category.id

Displays the ID of the category.

Example
									{{ category.id }}
								
category.title

Displays the title of the category.

Example
									{{ category.title }}
								
category.permalink

Displays a permalink to the category page.

Example
									{{ category.permalink }}
								
product.id

Displays the product’s ID.

Example
									{{ product.id }}
								
product.title

Display’s the product’s title.

Example
									{{ product.title }}
								
product.meta

Displays a product’s meta field.

Example
									{{ product.meta | key : custom_field_name }}
								
Parameters
keyThe corresponding meta_key of the field you would like to display.(Required)
defaultFallback if the field is not found or is empty.
product.featured_image

Displays the product’s featured image.

Example
									{{ product.featured_image }}
								
product.short_description

Displays the product’s short description.

Example
									{{ product.short_description }}
								
product.sku

Displays the product’s SKU.

Example
									{{ product.sku }}
								
product.regular_price

Displays the product’s regular price. Uses the wc_price() function.

Example
									{{ product.regular_price }}
								
product.current_price

Display the product’s current price. Uses the wc_price() function.

Example
									{{ product.current_price }}
								
product.add_to_cart_url

Displays a link to the product that will also add the product to the users cart when clicked.

Example
									<a href="{{ product.add_to_cart_url }}">Add to your cart</a>
								
product.permalink

Displays the permalink to the product.

Example
									<a href="{{ product.permalink }}">View {{ product.title }}</a>
								
shop.url

Displays the URL of your site.

Example
									{{ site.url }}
								
shop.tagline

Displays your site’s tagline.

Example
									{{ site.tagline }}
								
shop.title

Displays the title of your site.

Example
									{{ site.title }}
								
shop.admin_email

Display the site admin email. Note: You can use this variable in the To field when sending emails.

Example
									{{ site.admin_email }}
								
shop.current_datetime

Current datetime as per your website’s specified timezone.

Example
									{{ site.current_datetime | format: Y-m-d, modify: +2 months }}
								
Parameters
formatOptional parameter to modify the format of the datetime. See PHP date format documentation. Default format is MySQL Y-m-d H:i:s
modifyOptional parameter to modify the value of the datetime. Uses the PHP strtotime() function.
shop.products
Example
									{{ shop.products | type: featured }}

{{ shop.products | type: category,  category: clothing }}

{{ shop.products | type: ids,  ids: 1+2+3 }}

{{ shop.products | type: custom,  filter: my_custom_filter }}
								
Parameters
typeDetirmines which products will be displayed. Possible values are ids, category, tag, featured, sale, recent, custom(Required)
templateIncluded templates: product-grid-2-col.php, product-grid-3-col.php, product-rows.php.
To override or add new templates use directory: /% your theme %/automatewoo/email/