Support » Plugin: FiboSearch - Ajax Search for WooCommerce » Search not working on out of stock products

  • Resolved naveed849

    (@naveed849)


    Hello,
    I am using ajax-search-for-woocommerce plugin, and I notice the the products which are out of stock are not appear in search results.
    Can you help me in this, how I can solve this issue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Mateusz Czardybon

    (@matczar)

    Hello,

    If you mean a search results page, then go to “WooCommerce” >> “Settings” >> “Products” tab >> “Inventory” view >> and make sure “Out of stock visibility” is unchecked.

    As for the products suggested in the search, go to “WooCommerce” >> “AJAX search bar” >> “Search config” tab >> uncheck the “Exclude ‘out of stock’ products” checkbox >> press “Save changes” key.

    I have the same issue with the Plugin. We would like to show out of stock products (not shown in rest shop) only in search results of the plugin.

    In “WooCommerce” >> “AJAX search bar” >> “Search config” tab, I can no longer see the “Exclude ‘out of stock’ products”. Did this change?

    Plugin Author Mateusz Czardybon

    (@matczar)

    Hi,

    Since plugin version 1.11, the option “Exclude ′out of stock’ products” depends on the option “WooCommerce” >> “Settings” >> “Products tab” >> “Inventory view” >> “Out of stock visibility”. If this option in WooCommerce is checked, then in our plugin this option is hidden and products without stock are hidden in the search results by default.

    If you still want your products to be visible in search results in this case, add this filter to your child theme:

    
    // Force value of "Exclude “out of stock” products" option as "off"
    add_filter( 'dgwt/wcas/settings/load_value/key=exclude_out_of_stock', function ( $value ) {
    	return 'off';
    }, PHP_INT_MAX - 5 );
    

    Thank you Mateusz, the filter worked great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search not working on out of stock products’ is closed to new replies.