Hello,
maybe you can help me. I’m working on a woocommerce shop and i have an issue with a redirection to the payment gateway.
In log i have this error:
mod_fcgid: stderr: PHP Warning: include(): Failed opening '' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:/var/-----------------/web/hoipolloi/wp-content/plugins/woocommerce_postfinancecw/lib:/var/--------------------/web/hoipolloi/wp-content/plugins/woocommerce_postfinancecw/classes') in /var/----------------/web/hoipolloi/wp-content/themes/theme-hoipolloi/base.php on line 95
and a white area instead of the “injected” payment form at the <?php include roots_template_path(); ?>
If no existing threads here help then check the plugin for any hooks it may make into template_include and contact the plugin developer for support. That looks to be a paid plugin, so it should come with some level of support (and posting its source code here is likely prohibited by its license).
I’ve ‘solved’ it using the following (although editing the plugin file is not ideal - I will contact the premium plugin makers. Mine was Barclaycard EPDQ).
in lib/wrapper.php, do a check to see if the page is redirection.php (the file the plugin uses) and if so, don’t filter template_includes:
Then I navigated to /theme/barclaycardcw_redirection.php which is where the output of the redirection is called, and edited the theme to basically include everything from my base.php (including all the get_template_part()) which makes it behave like a normal page.
If you have a better solution I’d love to hear it.
In my case, the plugin was choosing either with regular redirection header('Location: '.$url);
or with a create a form, fill it and and on $(document).ready to submit it.
It was always choosing the second option that was failing to open.
I’ve just putted: $headerRedirection=true; in redirect.php in the plugin.
Always redirect with header(‘Location:’.$url); and it WORKS fine now.