ah yes woocommerce. They have a hook in the system that get in very early.
For me to get the preview to show without loading the site, I need hook in just before rendering the page, then load my own page.
This works 99% of the time, but for woo-commerce, they hook in way before that on the call, but hook the actual library way later. the result is the function is called but the library hasn’t loaded.
This is not bad on weecommerce development nor on mine, its just a situation that can’t be avoided.
However. I can make something to detect the hook for woocommerce on the preview and disable it for that view. I feel this may be ahack though.
I’ll look into finding a real fix for it.
For now, try adding in the php tab: if(!function_exists(‘woocommerce_demo_store’)){
function woocommerce_demo_store(){}
}
yup, very hacky but it might work for now.
Thread Starter
James
(@en7jos)
Hi and thanks for your prompt response.
If it’s just a matter of the preview not looking so pretty, then I’m not too bothered really (although it would be better if you could hide the error in some way so as not to raise questions!). I was more concerned whether it was something more fundamental broken with the plugin, WooCommerce of WP.
I’m happy to leave it as is with the error showing in the plugin for the moment given your explanation that it’s nothing important. But will look forward to a future update when you find a nice clean solution!
Cheers, and thanks for a very useful plugin!
James
well it almost 9 hours late, so it was not that prompt.
No its not fundamental problem, just one of those things were two plugins work in the same area. If anything, it more due to the way I intercept the load. It’s not the best way to do it but, I require the themes function file to be loaded in the event your shortcode uses a function in the theme. I’m sure I’ll find a solution.
I’m glad that you like the plugin, and if there are any other problem, don’t hesitate to let me know.
Thread Starter
James
(@en7jos)
Nine hours late? Still waiting for responses from author plugin authors weeks or months later! Within 24 hours is just fine thanks.
🙂
Ah! now I know I can slack off at time. Thanks!