Home › Forums › WoodMart support forum › Custom stock status remove from product carouse › Reply To: Custom stock status remove from product carouse
sabo_daniel
Ok but…
Is no other way to hide it from carousel ?
Like in this example
add_action( ‘woocommerce_product_query_meta_query’, ‘custom_product_query_meta_query’, 1000 );
function custom_product_query_meta_query( $meta_query ) {
if ( ! is_admin() ) {
$meta_query[] = array(
‘key’ => ‘_stock_status’,
‘value’ => ‘xoutofstock’,
‘compare’ => ‘NOT IN’,
);
}
return $meta_query;
}
But this example hide it from all parts of the website. I want only to hide it from products carousel.
Perhaps it is a filter for this situation when i can add a code snipet who hide specific custom stock status from carousel only.
Thanks,
B