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.phpyour-theme/template-name.phpwp-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.phpthe main loyalty dashboard wrapperpoints-page-guest.phpthe dashboard shown to logged-out visitorspoints-page-enrollment.phpthe opt-in screen for opt-in style programspoints-earn.phpthe list of ways to earn points (social actions, reviews, birthday, etc.)points-redeem.phpthe redemption slider and confirmation blockpoints-rewards.phpthe rewards / coupons sectionpoints-history.phpthe points activity logpoints-stats.phpthe summary stats block (balance, total earned, etc.)points-ranks.phpthe ranks progress and benefits blockrefer-a-friend.phpthe refer-a-friend blockmyaccount-loyalty-points.phpthe 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.