• 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 the function 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.

Viewing 1 replies (of 1 total)
  • Plugin Contributor Anton Korotkoff

    (@anton-korotkoff)

    Thanks for your help finding that bug!

    Fix will be applied in new version.

    —————–
    ‘WP-Invoice’ Team

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP-Invoice – Web Invoice and Billing] Custom Templates Ignored (solved)’ is closed to new replies.