Home Forums WoodMart support forum Undefined function woodmart_is_woo_ajax()

Undefined function woodmart_is_woo_ajax()

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #286398

    metuza
    Participant

    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

    #286413

    metuza
    Participant

    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

    #286568

    Artem Temos
    Keymaster

    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

    #286868

    metuza
    Participant

    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

    #287050

    Artem Temos
    Keymaster

    OK, we will add this code to our theme.

Viewing 5 posts - 1 through 5 (of 5 total)