BEAR - WooCommerce Bulk Editor and Products Manager Professional

Bulk edit WooCommerce variation images and variation galleries

Each WooCommerce variation can have one image of its own, and that image is what the shop shows when a customer picks the colour or size. To bulk edit variation images in WooCommerce for many products, give every blue variation the same swatch photo, or strip images that were imported by mistake, BEAR works with the variations as rows of the Products Editor. Extra images per variation are not a WooCommerce feature; they come from gallery plugins, and BEAR edits them as meta fields. This article covers both, plus variation descriptions and moving variation images through CSV.

Where WooCommerce keeps variation images

  • The variation image is the attachment ID stored in the variation's _thumbnail_id, the same key a product uses for its main image. A variation without one shows the parent product's main image when it is selected.
  • The product gallery belongs to the parent product only. WooCommerce has no gallery per variation, which is why BEAR's Gallery column is not offered for variation rows. For the product gallery, see the FAQs on adding images to existing galleries and removing gallery images.
  • Additional variation images come from plugins such as Additional Variation Images Gallery for WooCommerce, which store a list of image IDs on each variation under their own meta key.

Show and change the image of single variations

  1. Make sure the Thumbnail column is on in the Settings tab (it is on by default).
  2. In the Filters tab, set the product type to variable and press Filter. Lower the products per page to about 10, because every product brings all its variations into the table.
  3. Switch on variations on the tools panel. Each variation is now a row with its own image in the Thumbnail column.
  4. Click the image of a variation and choose another one in the media library. It is saved at once.

To give several variations the same image by hand, tick them (the select all variations button ticks every variation on the page), switch on binded editing and change the image of one ticked variation: the others get it too.

Bulk edit variation images by attribute

When the same picture belongs to every variation with one attribute value, for example a colour swatch for all blue variations, one bulk run sets it across all filtered products:

  1. Filter the products, for example by category, and switch on variations. The Bulk Edit tab now applies to variations only and ignores parent products.
  2. In the Bulk Edit tab, select the attributes the variations are built on in select combination of attributes, for example Color and Size, and press Add attributes combination to apply on. Set Color to Blue and Size to Any.
  3. Open the Additional section, tick Thumbnail, press select thumbnail and choose the image.
  4. Press Do Bulk Edit. Run it again with Red, Green and so on.

The combination row must name exactly the attributes a variation is built on, and an attribute left at not selected matches only variations without a value. The rules are explained in filtering variations by attribute. If each product has its own photo of the blue version, a shared image does not fit; use binded editing product by product instead.

Remove variation images in bulk

  1. Filter the products and switch on variations. Add a combination row only if some variations should keep their images; without one, all variations of the filtered products are changed.
  2. In the Additional section, tick Thumbnail and do not select any image.
  3. Press Do Bulk Edit.

The variations' image ID is set to 0, so they have no image of their own and the shop shows the parent product's image again. The files stay in the media library; only the link to them is removed. The run is recorded in History and can be reverted.

Additional variation images from gallery plugins

Attach the plugin's key

  1. Add a few images to one variation with the gallery plugin and save the product.
  2. Switch on variations in BEAR, copy that variation's ID from the ID column, and enter it in the Meta Fields tab under Get meta keys from any product by its ID. For Additional Variation Images Gallery for WooCommerce the key is woo_variation_gallery_images; for other plugins see how to find a product meta key.
  3. Choose the view gallery if the plugin stores a list of image IDs, which is what the database shows as a serialized array (a:3:{i:0;i:52;...}). If it stores one text such as 52,53,54, choose textinput and string instead and type the IDs in that form; the ID of an image is in its media library address (item=52).
  4. Press Save meta fields and switch the new column on in the Settings tab.

Set the gallery of many variations

With variations on, the column shows an Images button on each variation row. It opens a popup where you add images from the media library, drag them into order and press Apply. To give the same gallery to many variations, tick them, switch on binded editing and apply the gallery on one of them. Fields with the gallery view are not part of the Bulk Edit tab, so work page by page; a filter by category keeps the pages short.

Treat the popup as "set the gallery", not "edit it". On variation rows the button does not read the images already stored under the plugin's key: it shows Images (0) and opens empty even when the variation has a gallery. Whatever you apply replaces the variation's whole list, and an empty popup applied clears it. Check the result on the product page or in the variation's panel of the product editor.

Variation descriptions

With variations on, the Description column of a variation row is WooCommerce's variation description, the text shown under the price when that variation is chosen. In the Bulk Edit tab the Description row writes to the variation descriptions, filtered by the same attribute combinations as images. Variables help to keep the texts specific:

{PARENT_TITLE} in {attribute:pa_color}. Ships in 2 days.

Use the behaviour new for variation descriptions. The other behaviours start from the variation's own post text, which WooCommerce leaves empty, not from its description: append writes only your text, and replace empties the description. If that happened, revert the run in History.

Export and import variation images

With variations on, the Export tab writes a row for each variation. The Thumbnail column holds the image address under the heading Meta: _thumbnail_id, and a gallery meta column holds the image IDs joined with |. BEAR has no importer of its own; files go back in through WooCommerce's importer (Import from CSV in the Export tab opens it). In its mapping step, set the image column to Images rather than meta data: WooCommerce then attaches the image from the address and reuses the existing media library file when the address points to your own site. Do not import a gallery meta column back as meta data, because it would be stored as text instead of a list. The variations documentation covers the other variation tools.

Checklist

  • Products per page lowered before the variations switch goes on.
  • The combination row lists every attribute of the variations, with Any where the value does not matter.
  • Gallery plugin key confirmed on a variation ID, with the view that matches its format.
  • Variation descriptions changed with new only.
  • One test product checked on the front end before the full run.

If a variation gallery plugin stores its images in another way, post the plugin name and a variation ID on the BEAR support forum.