Undefined function woodmart_is_woo_ajax()
-
Hello,
I have never noticed any problems on site because of this but the below error i can find in our server log now and then. Never found in wp-debug log.
[Sun Apr 25 12:27:58 2021] [error] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Call to undefined function woodmart_is_woo_ajax() in /wp-content/themes/woodmart/index.php:6
Any idea what can cause this?
Brgds
Rune
Hello again,
I forgot to mention this PHP notice:
PHP Notice: Undefined index: HTTP_USER_AGENT in /wp-content/themes/woodmart/inc/modules/mobile-optimization.php on line 18
Brgds
Rune
Hello,
We can’t find the first error on our side. We need to have an exact algorithm to be able to reproduce it.
And the second notice will be fixed with the update.
Kind Regards
Hello,
No not easy to find what makes it happend, tried using logging but still not easy. So i replaced your code with the below and that seems to fixed it:
if ( function_exists( 'woodmart_is_woo_ajax' ) && woodmart_is_woo_ajax() ) {
do_action( 'woodmart_main_loop' );
die();
}
And i have not noticed any problems because of that.
Brgds
Rune
OK, we will add this code to our theme.