1. Documentation /
  2. AutomateWoo /
  3. Refer A Friend /
  4. Template files

Template files

Template files contain the markup for the frontend views and HTML emails in Refer A Friend. All of these templates can be customized by overriding one or more files in your theme. Customizing a template is sometimes required if you want to change the text shown on the frontend.

Template files can be found within the /automatewoo-referrals/templates/ directory:

List of template files:

↑ Back to top
  • account-tab.php – Outputs all account tab markup
  • account-tab-referral-table-row.php – Outputs markup for a single row in the account referral table
  • account-tab-referral-tables.php – Outputs markup for both referral tables in the account area
  • email-share-button.php – Outputs a single share button for the email share widget
  • email-share-buttons.php – Outputs all enabled share buttons in the email share widget
  • email-styles.php – Contains the CSS used for the email share widget
  • share-page.php – Outputs markup for the share page
  • share-page-form.php – Outputs markup for the share form on the share page
  • share-page-login.php – Outputs login request markup, shown when a user is logged out
  • share-widget.php – Outputs the website version of the share widget
  • share-widget-email.php – Outputs the email version of the share widget

How to edit a template file

↑ Back to top

It’s important to not edit the files directly in the /automatewoo-referrals/templates/ directory because all plugin files are replaced when you update the plugin. Edit files in an upgrade-safe way using overrides.

Copy the template into a directory in your theme named /automatewoo/referrals/ keeping the same file structure but removing the /templates/ subdirectory.

For example: To override the share page template, copy: ../wp-content/plugins/automatewoo-referrals/templates/share-page.php to ../wp-content/themes/yourtheme/automatewoo/referrals/share-page.php

Then you can make changes to the copied file and it will override the default template file in the plugin.

  • Please note: Template files will sometimes be changed in a plugin update and you might need to update your overriden templates. Please check the changelog each time you update to ensure that there were no changes that affect you.

WooCommerce

The most customizable eCommerce platform for building your online business.

  • 30-day money-back guarantee
  • Support teams across the world
  • Safe and secure online payment