Problem:
Use WP_Query to extract all order posts containing a specific value on the select field.
Solution:
The WP_Query will query posts in "Published" status by default:
https://developer.wordpress.org/reference/classes/wp_query/#status-parameters
But Woocommerce order posts do not use WP default status, so you need to define the post status parameter in WP_Query.
For example:
https://toolset.com/forums/topic/query-select-field/#post-2101145
Relevant Documentation:
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
Este tema contiene 2 respuestas, tiene 2 mensajes.
Última actualización por hace 3 años, 10 meses.
Asistido por: Luo Yang.