-
Notifications
You must be signed in to change notification settings - Fork 48
Product Image not populated with the REST API #100
Description
Prerequisites
Creating a product with the REST API doesn't populate the Product Image, only the Product Gallery.
- I have searched for similar issues in both open and closed tickets and cannot find a duplicate
- The issue still exists against the latest
masterbranch of WooCommerce on Github (this is not the same version as on WordPress.org!) - I have attempted to find the simplest possible steps to reproduce the issue
- I have included a failing test as a pull request (Optional)
Steps to reproduce the issue
- Create/update a product with three images via the REST API to a product
- Check the WooCommerce backend in the product view
- Notice that all images are in the Product Gallery, the first image is not in the Product Image section.
Problem also reported here for the first time: woocommerce/woocommerce#20148
I followed the documentation here: https://woocommerce.github.io/woocommerce-rest-api-docs/#product-images-properties
Expected/actual behavior
First image in the array shall populate the Product Image. The other images shall populate the Product Gallery.
Isolating the problem
- This bug happens with only WooCommerce plugin active
- This bug happens with a default WordPress theme active, or Storefront
- I can reproduce this bug consistently using the steps above
WordPress Environment
WordPress address (URL): http://www.staging.soeco.se
Site address (URL): http://www.staging.soeco.se
WC Version: 3.8.1
REST API Version: ✔ 1.0.2
Log Directory Writable: ✔
WP Version: 5.3.2
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: –
WP Cron: ✔
Language: en_US
External object cache: –
Server Environment
Server Info: Apache
PHP Version: 7.3.13
PHP Post Max Size: 32 MB
PHP Time Limit: 60
PHP Max Input Vars: 1000
cURL Version: 7.29.0
NSS/3.44
SUHOSIN Installed: –
MySQL Version: 5.5.5-10.1.43-MariaDB
Max Upload Size: 32 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
Database
WC Database Version: 3.8.1
WC Database Prefix: wp_
MaxMind GeoIP Database: ✔
Total Database Size: 231.85MB
Database Data Size: 205.28MB
Database Index Size: 26.57MB
wp_woocommerce_sessions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB
wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_comments: Data: 0.02MB + Index: 0.09MB + Engine InnoDB
wp_duplicator_pro_entities: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_duplicator_pro_packages: Data: 0.11MB + Index: 0.02MB + Engine InnoDB
wp_importer_files: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_importer_log: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_jet_smart_filters_indexer: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_layerslider: Data: 0.14MB + Index: 0.00MB + Engine InnoDB
wp_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_options: Data: 2.52MB + Index: 0.08MB + Engine InnoDB
wp_postmeta: Data: 166.67MB + Index: 15.06MB + Engine InnoDB
wp_posts: Data: 25.55MB + Index: 7.06MB + Engine InnoDB
wp_po_plugins: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB
wp_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_revslider_sliders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_revslider_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_smush_dir_images: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_termmeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_terms: Data: 0.08MB + Index: 0.09MB + Engine InnoDB
wp_term_relationships: Data: 1.52MB + Index: 1.52MB + Engine InnoDB
wp_term_taxonomy: Data: 0.08MB + Index: 0.06MB + Engine InnoDB
wp_usermeta: Data: 0.08MB + Index: 0.03MB + Engine InnoDB
wp_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wc_product_meta_lookup: Data: 1.52MB + Index: 1.34MB + Engine InnoDB
wp_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfBadLeechers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfBlockedCommentLog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfBlockedIPLog: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfBlocks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfBlocks7: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wfBlocksAdv: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfConfig: Data: 0.31MB + Index: 0.00MB + Engine InnoDB
wp_wfCrawlers: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfFileChanges: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfFileMods: Data: 2.52MB + Index: 0.00MB + Engine InnoDB
wp_wfHits: Data: 0.06MB + Index: 0.05MB + Engine InnoDB
wp_wfHoover: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfIssues: Data: 0.14MB + Index: 0.00MB + Engine InnoDB
wp_wfKnownFileList: Data: 1.52MB + Index: 0.00MB + Engine InnoDB
wp_wfLeechers: Data: 0.38MB + Index: 0.00MB + Engine InnoDB
wp_wfLiveTrafficHuman: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfLockedOut: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfLocs: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfLogins: Data: 0.05MB + Index: 0.03MB + Engine InnoDB
wp_wfls_2fa_secrets: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfls_settings: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfNet404s: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfNotifications: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfPendingIssues: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfReverseCache: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfScanners: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_wfSNIPCache: Data: 0.02MB + Index: 0.05MB + Engine InnoDB
wp_wfStatus: Data: 0.13MB + Index: 0.09MB + Engine InnoDB
wp_wfThrottleLog: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wfTrafficRates: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wfVulnScanners: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_woocommerce_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_wpfm_backup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wpmcleaner: Data: 0.08MB + Index: 0.00MB + Engine InnoDB
wp_wysija_campaign: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_campaign_list: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_custom_field: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_email: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
wp_wysija_email_user_stat: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_email_user_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_form: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_list: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_queue: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wysija_url: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_url_mail: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_user: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_wysija_user_field: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_user_history: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_wysija_user_list: Data: 0.02MB + Index: 0.00MB + Engine InnoDB
wp_yith_wcwl: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yith_wcwl_lists: Data: 0.02MB + Index: 0.03MB + Engine InnoDB
wp_yoast_seo_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB
wp_yoast_seo_meta: Data: 0.05MB + Index: 0.00MB + Engine InnoDB
Security
Secure connection (HTTPS): ❌
Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates.
Hide errors from visitors: ✔
Active Plugins (14)
Soeco Pro Plugin: by Brainstorm Force – 2.2.4
Astra Hooks: by Brainstorm Force – 1.0.1
Astra Widgets: by Brainstorm Force – 1.2.1
Custom Fonts: by Brainstorm Force – 1.2.0
Elementor Pro: by Elementor.com – 2.8.3
Elementor: by Elementor.com – 2.8.3
JetElements For Elementor: by Crocoblock – 2.2.2
JetSmartFilters: by Crocoblock – 1.6.1
JetProductGallery For Elementor: by Crocoblock – 1.1.0 – Not tested with the active version of WooCommerce
WooCommerce Brands: by WooCommerce – 1.6.9 – Not tested with the active version of WooCommerce
WooCommerce: by Automattic – 3.8.1
Yoast SEO: by Team Yoast – 12.8
Smush Pro: by WPMU DEV – 3.4.1
WPMU DEV Dashboard: by WPMU DEV – 4.7.5
Inactive Plugins (3)
Advanced Custom Fields: by Elliot Condon – 5.8.7
Advanced Custom Fields: Image Crop Add-on: by Anders Thorborg – 1.4.12
Advanced Custom Fields PRO: by Elliot Condon – 5.5.10
Must Use Plugins (1)
Elementor Safe Mode: by Elementor.com – 1.0.0
Settings
API Enabled: ✔
Force SSL: –
Currency: SEK (kr)
Currency Position: right_space
Thousand Separator: .
Decimal Separator: ,
Number of Decimals: 2
Taxonomies: Product Types: external (external)
grouped (grouped)
simple (simple)
variable (variable)
Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
exclude-from-search (exclude-from-search)
featured (featured)
outofstock (outofstock)
rated-1 (rated-1)
rated-2 (rated-2)
rated-3 (rated-3)
rated-4 (rated-4)
rated-5 (rated-5)
Connected to WooCommerce.com: –
WC Pages
Shop base: woocommerce/woocommerce#4 - /produkter-i-lager/
Cart: woocommerce/woocommerce#5 - /varukorg/
Checkout: woocommerce/woocommerce#6 - /kassan/
My account: ❌ Page visibility should be public
Terms and conditions: #56911 - /kontakt/
Theme
Name: Astra Child
Version: 1.0.0
Author URL: https://www.effektivahemsidor.se
Child Theme: ✔
Parent Theme Name: Astra
Parent Theme Version: 2.2.1
Parent Theme Author URL: https://wpastra.com/about/
WooCommerce Support: ✔
Templates
Overrides: –
Action Scheduler
Complete: 2
Oldest: 2019-12-14 10:31:01 +0100
Newest: 2020-01-07 15:39:06 +0100
Pending: 0
Oldest: –
Newest: –
Canceled: 0
Oldest: –
Newest: –
In-progress: 0
Oldest: –
Newest: –
Failed: 0
Oldest: –
Newest: –
`