Affiliate for WooCommerce plugin helps you to add, manage affiliates, and track performance from a single place – commissions, sales, payouts, leaderboard, etc. Earn money without hard work. Increase your brand outreach, and get potential customers.
This doc explains different templates the plugin has and how you can override them.
All templates are located in the ‘templates’ directory of Affiliate for WooCommerce –
/affiliate-for-woocommerce/templates/ and are overridable.
If you want to change or modify the content or layout of a template, you can do it by using the ‘another template file’ method explained below.
1. We recommend using the child theme if you are overriding the templates as explained above. Read more here: Set up and use a child theme.
2. The above method is considered customization. We are happy to provide guidance, but we are unable to provide support or help to suit your store. Only use it if you are comfortable with PHP and custom coding and troubleshooting on your own.
Override via another template file (Upgrade-safe)↑ Back to top
Use your own template in place of the default one provided by Affiliate for WooCommerce. Copy the template into a directory named ‘
woocommerce’ within your theme keeping the same file structure but removing the ‘
Consider you want to override the email sent to affiliates when they join your affiliate program (Welcome email). Follow these steps to override that template:
- Create a template file and keep the file name as:
afwc-welcome-affiliate-email.php. Other file names will not work.
- Open your themes folder and check if you have a folder named
woocommerce. If not, create a folder named
woocommercefolder and create a new folder inside it. Keep that folder’s name as:
- Place the file
For example: To override the email template of the affiliate welcome email,
The copied file will now override the Affiliate for WooCommerce default email template file for the welcome email.
Affiliate for WooCommerce plugin will use your template file (if found) for the Welcome email sent.
Override emails↑ Back to top
This section explains the emails the plugin sends to affiliates and affiliate manager/store admin and how you can override the email templates.
You can follow the above method to override these email templates of the Affiliate for WooCommerce plugin:
afwc-welcome-email.php– Email is sent to the affiliate when they join your affiliate program via the registration form.
afwc-commission-paid.php– Email is sent to the affiliate when commission is paid on their referral orders.
afwc-new-conversion.php– Email is sent to the affiliate when a new order is placed using their referral link/coupon.
afwc-new-registration-received.php– Email is sent to the affiliate manager/store admin when someone joins your affiliate program.
Override affiliate account↑ Back to top
This section explains how you can override tabs from affiliates’ my account.
To override the profile tab of the affiliate’s my account,
The copied file will now override the My Account > Affiliate > Profile tab and the plugin will use your template file (if found).
Feature request↑ Back to top
Have a feature request or enhancement suggestion for Affiliate For WooCommerce? Submit it from here: Submit a feature request.