C
C
Cyril2018-09-25 22:50:58
WordPress
Cyril, 2018-09-25 22:50:58

's' (search) argument in WC_Product_Query and wc_get_products?

According to these Docs from woocommerce, you should always use wc_product_query instead of wp_query, but there is no 's' argument. Maybe someone did a search by the name of the product somehow? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Pupkin, 2018-09-26
@jensen6720185

Well, at the expense of "necessary" - an exaggeration.
The standard product search via WP_Query works because the product is basically a normal entry in wp_posts :-)
Use it and don't worry.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question