The WC_Product object has an image_id
(string) and an gallery_image_ids
(array) attribute for product image and product’s gallery images. Both of them are attachment ids, so you should get the image src from it’s attachment id with the wp_get_attachment_image_url()
method and add it to your $products
array.
Related Posts:
- Woocommerce REST API – add filter to set maximum query per page for product brands [closed]
- WooCommerce REST API endpoints don’t exist
- Fetch products with filter by similar categories at same time
- Auto generating API keys using the Application Authentication Endpoint [closed]
- WP/WooCommerce REST API cart/checkout/order [closed]
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Process checkout using WC REST API
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Extend Woocommerce rest api routes fails
- How to filter Post using Meta Data REST API
- Creating woocommerce product using WordPress REST API
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Output JSON object with woocommerce products
- Problem with cURL and rest API
- Woo API REST : product variation price is read-only?
- Category Tree In WooCommerce Product API
- How to upload Woocommerce product images via API? [closed]
- Woocommerce REST API allow normal users make an order
- How to modify WCMP Rest API response?
- How to handle Woocommerce API credentials
- What will make Woocommerce REST API to issue 401 [closed]
- Woocommerce api: create product with images – bad request
- Woocommerce custom endpoints
- Woocommerce REST API – updating an order changes custom tax calculations
- Woocommerce Rest Api Categories problem [closed]
- Expired session error (admin) when I try to make a call to WooCommerce api [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- woocommerce axios react
- Get specific values in Woocommerce Rest API
- How can I get all the woocommerce api orders [closed]
- WooCommerce – Add product with image via REST API
- Tax are not showing on order while placing order with REST API
- JWT on Woocommerce cannot work with “Customer” role user
- Update Customer JWT Woocommerce
- Woocommerce, finding the ordinal number of a purchase for a certain product
- WooCommerce – Create multiple product tags via rest api endpoint
- WordPress SMS API integration without plugin error
- Absolute search against wordpress api
- Using the WordPress and WooCommerce REST APIs in the same Node app
- Retrieve Data from Custom Endpoint
- WordPress Woocommerce REST API JSON Error
- How to solve `Error getting remote image` in woocommerce rest api script?
- Getting in an exception for get product detail by id in woocommerce REST api
- Impossible to create a new WooCommerce customer using Rest API
- Woocommerce API security concerns
- Getting WordPress fatal error when hitting WooCommerce API
- wc_get_products() return empty object
- How can I send information when a order is completed to my own POS?
- woocommerce REST api on the website’s front-end
- Woocommerce Rest API: woocommerce_product_invalid_image_id
- How to save one API response to WooCommerce order meta data
- How can I get a get a list of customers from a list of email addresses?
- How to get WordPress to respond to a GET request at the end of a Woo product page
- Working with a json feed & trying to figure out how best to import
- WC Booking query bookings with date ranges
- Delete product image using WooCommerce API?
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Woocommerce REST API: creating variations
- email address non required
- Woocommerce REST API not considering discounts and coupons
- WordPress returning “XHR” even when access keys are used
- Bypass wp_safe_remote_get()?
- How to programatically create a WooCommerce downloadable product?
- Users credentials and syncing from third party with WooCommerce
- Manual Woocommerce Complete order Emails
- Woocommerce API REST search by multiple keywords
- Create WordPress account on different domain when WooCommerce order completed
- Send data to external websites when there is an update or create a post
- GET woocommerce order request is not showing meta data [closed]
- Display WooCommerce size product attribute on shop page
- Display a list subcategories under the main product category thumbnails?
- Unable to programmatically remove product from WooCommerce cart
- How to Change WooCommerce Variable product pricing by SKU or visible children id
- Is it possible to cache ?wc-ajax=get_variation
- Display list of categories that contain products with a specific tag
- How to display empty stars on products with woocommerce?
- Product options/variations notice displays as an Alert [closed]
- Hide decimal on hompage, category and product page
- Shipping methods in dropdown instead of radio buttons [closed]
- 600k of option_name “c_facebook_background_product_sync_job”
- How to change woocommerce checkout privacy policy, terms and condition text [closed]
- add to cart button not adding products in cart only in safari and edge browser [closed]
- Images are displaying as blank images
- Woocomerce pulling wrong time from server -5 hrs difference
- What happens in the database when you link variations in woocommerce? [closed]
- Display custom product option in admin order details
- remove sale price after finished countdown in woocommerce
- Woocommerce. How can I charge a fee from seller
- How to use decimal in quantity fields in WooCommerce for certain categories?
- how i can limit woo Category number like as ‘posts_per_page’ => -1, but it cannot work please help me
- Forgot password flow does not work, getting email with a link but after clicking link it’s not working
- Html code is not showing in woocommerce shop page on adding in header.php?
- Importing Attributes in to Woocommerce
- woocomerce products and categories don’t display fixed
- WooCommerce Table Rates not splitting up
- How can I let the user choose size of a shoe in the store? [closed]
- Hide/show specific products for backend users in woocommerce
- I’d like to add a button under the “Add to Cart” button which says “Buy on Amazon” and links to my Amazon product page [closed]
- How do I remove the recurring total from thank you for your order email?
- I want to Display custom woocomerce meta box in orders list