• Resolved Pinheiro

    (@pinheiropt)


    Hello,

    Suddenly the search results on pages /?s=produt1&post_type=product&product_cat=0 are empty.
    When I’m typing the results are showing but after I click to see all results the pages are empty.
    How to troubleshoot this?
    I’m using the theme woodmart, it has an ajax search built-in.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mikko Saari

    (@msaari)

    This is a problem with WooCommerce 4.4.1, see here for the solution.

    Thread Starter Pinheiro

    (@pinheiropt)

    @msaari I’ve added the function to functions.php but it does not solve the problem for me.
    I have Woocommerce 4.4.1 and WordPress 5.4.2

    Plugin Author Mikko Saari

    (@msaari)

    Is the code running? If you change the code to this:

    add_action( 'woocommerce_before_shop_loop', 'relevanssi_wc_reset_loop' );
    function relevanssi_wc_reset_loop() {
    	global $wp_query;
    	if ( $wp_query->is_search ) {
    echo "THE CODE IS RUNNING";
    exit();
    		wc_reset_loop();
    	}
    }

    and then do a search, does it say the code is running?

    Thread Starter Pinheiro

    (@pinheiropt)

    After your recent update, it started working again!
    Thank you.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Results only show in ajax’ is closed to new replies.