Template structure & overwriting templates

Note: This is developer level documentation. Within the scope of our support policy, we cannot provide support for customizations unless they have been ordered through us. If you are not familiar with overriding templates and resolving possible conflicts, contact us for help.

Overview

Enwikuna License Manager templates contain the markup and template structure for the frontend and HTML emails of your licenses store.

When you open these files, you’ll notice that they all contain hooks that allow you to add or move content without having to edit the template files themselves. This method protects against problems during updates, as the template files can remain completely untouched. For more information, see the documentation on extending Enwikuna License Manager & Enwikuna License Manager Pro.


Templates

You can find all templates inside the following folder:

Enwikuna License Manager

/enwikuna-license-manager/templates/


Enwikuna License Manager Pro

/enwikuna-license-manager-pro/templates/

Please note that you can not overwrite all templates, but only the templates that are located inside the woocommerce subfolder! All other templates are system-relevant and cannot be adapted by overwriting. However, this should be enough to customize all the sections visible to your customer.


Overwrite templates

If the available hooks in the respective template are not sufficient for you to customize, you can change the template. Instead of customizing the template directly, you need to overwrite it! This will prevent your customizations from being overwritten during the next update (yes, during updates all files are replaced, whether modified or not).

For this, you have to copy the corresponding template into a folder named woocommerce inside your child theme, making sure to keep the folder structure! This also applies to any subfolders. You can ignore the main templates folder.

Here is an example
To overwrite the licenses page within the customer account, you need to copy the following file:

/wp-content/plugins/enwikuna-license-manager/templates/woocommerce/myaccount/licenses.php

to

/wp-content/themes/yourtheme/woocommerce/myaccount/licenses.php

The default template has now been overwritten and will be ignored. You can now safely make all your changes in the copied template.

Warning: It can happen that templates change after updates. If you have overwritten a template that has changed, this can lead to errors! Therefore, it is important that you check if a template has been changed or not after each update. If any changes have been made, you will need to apply them to your overwritten template.