Template Coupon Code
Updated February 23, 2022
The template coupon is a normal WooCommerce coupon that the plugin uses as a blueprint. It is never given to an affiliate, and customers can’t use it. It exists only so the plugin knows what settings to give each new affiliate coupon it creates.
When you accept an affiliate application, the plugin creates a brand new coupon using the affiliate’s own code, copies the template’s settings onto it, and assigns the affiliate to it.
You need to set this up before affiliate registrations will work. Without a valid template coupon, accepting an application will not create a coupon.
Creating your template coupon
- Go to Marketing → Coupons → Add coupon and create a normal WooCommerce coupon. Give it an obvious name, for example
affiliate_template_coupon. - Set the discount type and amount you want your affiliates’ coupons to give their customers, along with any usage limits or restrictions.
- Publish the coupon.
- Go to Coupon Affiliates → Settings → Registrations, and enter the exact coupon code in the Template coupon code field.
- Save your settings.
The field must match the name of an existing coupon exactly, and is case sensitive. When it matches, a green tick and an “Edit Coupon” link appear next to the field. If it doesn’t, you’ll see “Invalid coupon! This should be the exact name of an existing coupon code.”
If you’re going through the plugin’s setup wizard, you can use the Generate Coupon button instead, which creates a basic template coupon for you from a discount type and amount. You can edit it afterwards like any other coupon.
What gets copied to each affiliate coupon
- Every setting on the template, including the discount type and amount, expiry date, usage limits, minimum and maximum spend, allowed emails, product and category restrictions, and the plugin’s own per-coupon settings such as the commission rate.
- The affiliate is assigned to the new coupon automatically, and its statistics, commission balance and usage count all start at zero. The template’s own usage history is never carried over.
- In the free version, per-coupon commission settings are not copied. Affiliate coupons use the site-wide rate on the Commission settings tab instead.
The settings are copied once, at the moment the coupon is created. Editing your template later does not change any coupon that already exists – only affiliates accepted after the edit will get the new settings.
This means an expiry date on the template is copied as a fixed date, not “30 days from now”. If you set one, every affiliate coupon created afterwards will expire on that same day. The same applies to usage limits and restrictions: whatever is on the template applies to every affiliate.
Your template is also used when you bulk create affiliate coupons, and when you add an affiliate manually.
Discount and commission are separate
These are two different amounts, and it’s easy to mix them up.
The discount is set on the template coupon itself, and is what the customer saves when they use the affiliate’s code. The commission is what the affiliate earns from the sale, and is set separately – either as a site-wide rate on the Commission settings tab, or per coupon on the coupon itself. Setting a 20% discount does not give the affiliate 20% commission.
Common problems
“Coupon code was not created. Template has not been selected.” – no template coupon is set in the Registrations settings tab. Set one, then accept the application again.
The affiliate’s coupon was created, but gives no discount. – the name in the Template coupon code field doesn’t match a real coupon, so there were no settings to copy. Check the spelling and capitalisation against the coupon in Marketing → Coupons.
“Admin notice: The ‘template coupon code’ can not be applied to any cart.” – this appears if the template coupon code is applied to a cart. The template is not a usable coupon, so the plugin removes it. Only admins see this message; for customers the code is removed silently. Affiliates should be using their own code, not the template.
You want different templates for different affiliates – the PRO version supports several templates, with the affiliate choosing on the registration form. See (PRO) Multiple Template Coupons.