-
AuthorPosts
-
January 10, 2020 at 7:58 pm #1172297
Hi,
I have the setting “Hide out of stock items from the catalog” checked but I still see out of stock products in the search AJAX results as well as on the search results page.
How do I prevent out of stock items from showing up in both places?
Thank you.
- This topic was modified 4 years, 11 months ago by nychng.
January 13, 2020 at 8:34 am #1172687Hey nychng,
Thank you for the update.
Can you give us an example of the products that are out of stock or those that should not be showing in the search results page? Also, make sure that the WooCommerce settings -> Products -> Inventory -> Hide out of stock items from the catalog
February 24, 2020 at 9:49 am #1187236Same problem here anything new on this? ” Hide out of stock items from the catalog” is set.
February 26, 2020 at 5:39 am #1187954Hi,
@mikeandrewfischer: Thanks for chiming in. Where can we see the issue? OP hasn’t responded yet, so we haven’t got the chance to check the issue. Please open a new ticket/thread and post the necessary details in the private field such as the login info, link to the page/s with the issue, screenshots etc. Thank you.Best regards,
IsmaelFebruary 26, 2020 at 9:41 am #1187998This reply has been marked as private.February 27, 2020 at 10:31 am #1188362Hi,
Thank you for info.
Can we deactivate the plugins temporarily? We can’t reproduce the issue on our end, so it’s possible that this is an issue with the shop extensions.
Best regards,
IsmaelFebruary 27, 2020 at 10:33 am #1188364Yes Please
February 28, 2020 at 9:14 am #1188782Hey!
We managed to temporarily fix the issue on our end by adding this code in the functions.php file. but it’s not working in your installation.
function avf_hide_out_stock_products($query, $params) { $query['tax_query'][0] = array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => array('outofstock'), 'operator' => 'NOT IN' ); return $query; } add_filter('avia_product_slide_query', 'avf_hide_out_stock_products', 10, 2); add_filter('avia_masonry_entries_query', 'avf_hide_out_stock_products', 10, 2);
We have reported the issue to our channel and we’ll let you know once we found a fix.
Best regards,
IsmaelFebruary 28, 2020 at 9:27 am #1188783Hej Ismael, when I open the page there is no change at the moment – Woocommerce shop hides the “out of stock products” as it should – but masonry and the Grid still shows ” out of stock products ” ??
regards MikeMarch 3, 2020 at 1:40 am #1189550Hi!
but it’s not working in your installation.
Sorry for the delay. As we’ve said earlier, the snippet works on our own installation but it didn’t work in yours. Oddly enough, we can no longer reproduce the issue on our end, but we didn’t really know what changed or what made it work again.
Can we access the site? The login token has expired, so we couldn’t check the site again.
Regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.