[Plugin: WP-Invoice – Web Invoice and Billing] Custom Templates Ignored (solved)
-
I tried using the custom templates on learncomputer.com and quickly found that WP-Invoice ignores the custom UI templates, even when the directory
/wpi/
exists in the current theme folder. I poked around and found the source of the problem in thefunction wpi_use_custom_template($template)
located in/core/wpi-functions.php
file. The logic of checking whether to use the custom templates is inverted. So to fix it, you need to replace this snippet inside the function:if (isset($wpi_settings['use_custom_templates']) && $wpi_settings['use_custom_templates'] == 'yes') { return false; }
with this one:
if (!isset($wpi_settings['use_custom_templates']) || $wpi_settings['use_custom_templates'] != 'yes') { return false; }
Just wanted to post this solution in case someone else starts pulling their hair because their custom templates aren’t being used by WP-Invoice.
- The topic ‘[Plugin: WP-Invoice – Web Invoice and Billing] Custom Templates Ignored (solved)’ is closed to new replies.