New: Revenue First Analytics. See which channels actually drive your WooCommerce revenue. Learn more →

Edit template files

Last updated

Refer a Friend’s front-end screens and emails are built from template files, like WooCommerce’s. To change their HTML or text beyond what the settings allow, copy a template to your theme and edit the copy. Plugin updates don’t overwrite it.

Before you start: use a child theme, so a theme update doesn’t remove your templates. Templates checked with version 4.4.12.

Copy a template

  1. In your child theme folder, create a folder named wpgens-raf.
  2. Find the template in the plugin folder, wp-content/plugins/wpgens-refer-a-friend-premium/templates/.
  3. Copy it to wpgens-raf/ in your theme, keeping the same subfolders. See the table below.
  4. Edit your copy.

Where each template goes

The modern design, which is the default, uses the modern subfolder. Emails always use emails.

What you want to change Plugin file Copy to your theme as
My Account tab templates/modern/myaccount-tab.php wpgens-raf/modern/myaccount-tab.php
Product page tab templates/modern/product-tab.php wpgens-raf/modern/product-tab.php
[WOO_GENS_RAF_ADVANCE] and thank-you page templates/modern/advance-shortcode.php wpgens-raf/modern/advance-shortcode.php
What guests see templates/modern/guest-*.php wpgens-raf/modern/guest-*.php
Parts: link, rewards box, share buttons, text, guest form templates/modern/parts/*.php wpgens-raf/modern/parts/*.php
Coupon, reminder and share emails templates/emails/*.php wpgens-raf/emails/*.php

If you turned on Use old legacy look, copy from templates/ without modern, to wpgens-raf/ without modern.

Your copies don’t get the plugin’s fixes and new features. After a plugin update, compare your copies with the new templates, and copy only the files you really need to change.

Simpler alternatives

  • To change texts, use Display Settings and the WooCommerce email settings first.
  • To change colors or spacing, add CSS in Appearance → Customize → Additional CSS instead of copying templates. The referral section’s classes start with gens-referral_ and gens-raf.
  • To translate texts, see Translate Refer a Friend.

Check it worked

Add a small visible change to your copy, such as a word, and reload the page. If you don’t see it, check the folder name and whether you used the modern subfolder. Then clear your caching plugin’s cache.

Related

Browse our plugins

Lightweight WooCommerce plugins built for speed. No bloat, no frameworks -- just clean code that works.

View all plugins
Stay in the loop

Get notified when we launch new plugins. No spam, just product updates.