$args = array(
'post_type' => 'product',
'meta_key' => 'YOUR_FIELD_ID',
'meta_value' => array('yes'), //'meta_value' => array('yes'),
'meta_compare' => 'IN' //'meta_compare' => 'NOT IN'
);
$products = wc_get_products($args);
foreach ($products as $product) {
//do your logic
}
Related Posts:
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Query multiple post type and categories
- I can ‘t display product images based on the label
- DELETE WooCommerce Order data from database
- Custom template – query issues
- How to filter result set in custom metaboxes?
- Url parameter going to 404 not found
- WC Booking query bookings with date ranges
- Custom product loop avoiding duplicates
- Trying query woocommerce product order by menu order and stock status
- How to check if is in cart page? [closed]
- Display single product attribute value on Shop page (Woocommerce)
- Woocommerce 3.1 Add product image to order confirmation email not working
- Woocommerce: show default variation price is products list?
- WooCommerce add_to_cart url not working [closed]
- How to Add Product Variation with Multiple Images via WooCommerce REST API
- How to build wordpress site which will have location based services & products?
- How we can edit variations on cart page? [closed]
- new WC_Order(); Coming Back Empty
- Woocommerce: Get Cart ID
- Woocommerce – remove sale price field from dashboard [closed]
- how to use different page design for different category
- Getting WordPress database error Deadlock
- show shop instead of 404 page for missing products
- if statement for search results
- Woocommerce exclude specific categories products from related products
- Woocommerce: Prevent sending of email when order is “Completed”
- Apply a discount percentage to regular price WooCommerce by function
- Add sub subpage endpoint in woocommerce
- Edit WooCommerce product content based on category
- Place Order button in Checkout
- woocommerce – How Can I add author metadata for a product? [closed]
- How to incluide custom field in WooCommerce email using placeholder
- Woocommerce: Can’t put items in cart in iframe and on iphone
- Display products by category in Woocommerce cart page?
- shortcode to display woocommerce cart total
- Woocommerce – Want to move the product tabs below short description
- Where is the CSS class ui-sortable-handle for WC_Admin_Taxonomies added?
- WooCommerce: “account is already registered with your email address”
- How to upload multiple image using wp_insert_post
- How can i manage total price in checkout page? [closed]
- In WooCommerce product archive, how can you also set the quantity to be added to cart by typing, instead of just by using +/-?
- WooCommerce product category permalinks
- How to do string attachment with wp_mail
- Can’t show most recent comment on top with wp_list_comments() for WooCommerce reviews
- WooCommerce order complete email logic
- WooCommerce Displaying Price With & Without TAX [closed]
- Woo commerce using add_fee to add discount to cart not saving discount amount the admin backend when guest user is shopping
- How to change Attribute Type
- WooCommerce plugin won’t let me access settings
- What’s the fastest way to import products with variations in WooCommerce (CSV, XML, …) [closed]
- WOOCOOMERCE: Run function before payment gateway (paying)
- Can’t filter out variable products in sale from wp_get_products loop (or shortcode) [closed]
- main menu hide woo commerce single products tittle
- What Hook/Action is performed when a field in checkout form is changed in WooCommerce
- Benefits over using object method over property from $product?
- Order by date on category dynamically – Woocommerce
- Woocomnerce Limit Purchase value before proceed checkout
- Add to cart – button should be disabled
- WooCommerce – change child category URL structure
- How To Customize The Product Page Template for a WooCommerce Custom Product Type Plugin [closed]
- Hide Add to Cart button on woocommerce Product description page of a particular product
- Remove required from a custom field created from WooCommerce Checkout Field Editor plugin
- How to change status of woocommerce orders when post status is changed
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- How to send woocommerce emails in multiple languages
- Custom WooCommerce rewrite rules with comma delimiter
- Set city as required if country is Singapore
- WooCommerce Simple Auctions add username to auction finished email
- Enable Gutenberg for Woocommerce
- How to change product category permalinks programmatically?
- Make e-Mail optional on Woocommerce sign up
- Missing variable options on add to cart form
- Create order actions from custom fields woocommerce
- Woocommerce digital download not working – database error Cannot add or update a child row: a foreign key constraint fails [closed]
- when product out of stock single page show button notify woo-commerce
- WooCommerce , Auto cancel orders status from processing after X days
- Change WooCommerce Word “Product” to Another Word
- How does a WooCommerce site integrate with the existing real world customer members?
- How can I send information when a order is completed to my own POS?
- How to save order item custom attributes save into custom table
- Manually create an order with a product ID woocommerce
- How to change lost password email text using custom plugin wordpress?
- wc_mail in foreach loop is sending only the first email
- How to hide / remove duplicated Woocommerce products from Shop page
- How to add product variations for large number of products in WooCommerce?
- Is it safe to update an old site after backing it up and activating a child theme?
- Disable Woocommerce main shop page, but not the product category archive pages
- Woocommerce Languages Files
- How to store ACF from product in user_meta?
- Changing second user role while updating/downgrading membership level – s2member [closed]
- How to edit the header banner in the search page in woocommerce?
- How to edit schema.org markup of WooCommerce?
- How to change redirect code? [duplicate]
- WooCommerce Total # orders [closed]
- Send data to external websites when there is an update or create a post
- Disable duplicate WC product category URLs
- how should i get products based on tags in woocommerce
- Add custom text to product category page
- Woocommerce permalink URL change in DB