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?
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!