Temanızın functions.php dosyasına kodu ekleyerek halledebilirsiniz.
function custom_pre_get_posts_query( $q ) {
$tax_query = (array) $q->get( 'tax_query' );
$tax_query[] = array(
'taxonomy' => 'product_cat',
'field' => 'id',
'terms' => array( '19' ),
'operator' => 'NOT IN'
);
$q->set( 'tax_query', $tax_query );
}
add_action( 'woocommerce_product_query', 'custom_pre_get_posts_query' ); 'terms' => array( '19' ),
burada bulunan 19 kategorimizin ID değeridir. Gözükmemesini istediğiniz kategori ID sini yazarak gizleyebilirsiniz. Birden fazla kategori gizlemek istiyorsanız eğer;
'terms' => array( '19' ,'16','547'),
bu şekilde değerleri girmeniz gerekli.