How to Override Loyalty Program for WooCommerce Templates in Your Theme

Loyalty Program for WooCommerce ships every customer-facing layout as a PHP template you can override from your theme. This means you can adjust the markup of the Earn Points list, the Redeem panel, the rank progress block, and every other front-end view without modifying the plugin itself, so your customizations survive plugin updates.

How the Lookup Works

When the plugin renders a template, it looks for the file in this order:

  • your-theme/wpgens-loyalty/template-name.php
  • your-theme/template-name.php
  • wp-content/plugins/wpgens-loyalty-program/templates/template-name.php (default)

If any of the first two files exist, the plugin uses your copy instead of its own. There is no version warning or migration step: the override applies immediately and stays in place across plugin updates.

Step 1: Create the Theme Folder

Inside your active theme (a child theme is strongly recommended) create a folder named wpgens-loyalty:

wp-content/
  themes/
    your-theme/
      wpgens-loyalty/
        points-earn.php
        points-redeem.php
        points-page.php
        ...

Step 2: Copy the Template You Want to Edit

Copy the file from wp-content/plugins/wpgens-loyalty-program/templates/ into the folder you just made, keeping the same file name. Edit your copy, not the original. Any changes you make to the plugin’s templates/ folder will be wiped out on the next plugin update.

Available Templates

These are the files you can override. Each one controls a specific area of the loyalty experience:

  • points-page.php the main loyalty dashboard wrapper
  • points-page-guest.php the dashboard shown to logged-out visitors
  • points-page-enrollment.php the opt-in screen for opt-in style programs
  • points-earn.php the list of ways to earn points (social actions, reviews, birthday, etc.)
  • points-redeem.php the redemption slider and confirmation block
  • points-rewards.php the rewards / coupons section
  • points-history.php the points activity log
  • points-stats.php the summary stats block (balance, total earned, etc.)
  • points-ranks.php the ranks progress and benefits block
  • refer-a-friend.php the refer-a-friend block
  • myaccount-loyalty-points.php the My Account loyalty tab wrapper

Filter Hooks for Advanced Overrides

If you want your override to live somewhere other than your theme folder, for example inside a site plugin, use the wpgens_loyalty_locate_template filter to return an arbitrary file path:

<?php
// Force the plugin to load a template from a different location.
add_filter('wpgens_loyalty_locate_template', 'my_custom_loyalty_template', 10, 2);

function my_custom_loyalty_template($template, $template_name)
{
    if ($template_name === 'points-earn.php') {
        return WP_PLUGIN_DIR . '/my-custom-plugin/templates/points-earn.php';
    }
    return $template;
}

The companion filter wpgens_loyalty_get_template works the same way but applies after the lookup, useful if you need to inspect or modify the $args array the template will receive.

Best Practices

  • Always work in a child theme. Overrides placed in a parent theme can be lost when the parent theme updates.
  • Copy the entire file, then trim it down to what you need. Removing a variable a later block expects causes warnings.
  • When the plugin updates, diff your override against the new default to pick up any markup or class changes.
  • Keep your customizations focused on markup, classes, and copy. Move business logic into hooks or filters so it does not get lost the next time you re-copy a template.
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.