Overriding templates in your theme

If one of our plugins have "templates" folder, then you can override those templates in your theme.

Please note that it won't be possible to override and other files from the plugin!

To do that, just copy "templates" folder into your theme's folder and rename it to plugin's name, as per this table:

Plugin Theme folder name
WooCommerce Dynamic Pricing & Discounts wc-dynamic-pricing-and-discounts
Subscriptio  subscriptio
WooCommerce Custom Fields woocommerce-custom-fields
WooCommerce Email Center woocommerce-email-center
WooCommerce Membership woocommerce-membership

You can delete all the unneeded files in this new folder, i.e. the ones you don't need to change. But it's highly important to keep the inner folder structure.

So, for example, if you'd like to change template file of pricing table "horizontal.php" in WooCommerce Dynamic Pricing & Discounts, here are the steps:

1. Copy "templates" folder to your theme folder and rename it to "wc-dynamic-pricing-and-discounts". 

2. Inside this folder you will see "volume-pricing-table" folder, in which there will be files:

vertical.php
modal-vertical.php
modal-horizontal.php
inline-vertical.php
inline-horizontal.php
horizontal.php

3. You need only horizontal.php, so you can delete the rest and customize only this file. That way WooCommerce Dynamic Pricing & Discounts plugin will use default templates for other cases, and only one will be customized.

If you don't delete the unneeded files, they will be used by the plugin, and even after updates - if those will affect plugin's default template files, old ones (overridden) will be used.

 

Have more questions? Submit a request