V
V
vadbobkov2018-12-08 01:59:54
WooCommerce
vadbobkov, 2018-12-08 01:59:54

How to hide a product if it doesn't fit in woocommerce?

Good afternoon. There was such a situation, how to hide a product if its value is higher than the number 40, code example:
<?php
$args = array(
'tax_query' => array(
'relation' => 'AND',
),
'posts_per_page' => 10 ,
'post_type' => 'product',
'orderby' => 'title',
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();
global $product;
?>
How to make the product show if the meta-data from the field has a value of 40 or less, if more, then the product is not shown?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question