External Variation Images & WP All Import

Kyle I. asked 3 years ago

Hi Dave,

1) I created a custom field called 'external_image_url' in WP All Import and images are importing. Most are under the same met_key that was created, but some are added under '_external_image_url'.

2) Variation images aren't importing. I manually added an external image url to a variation and can see in the database that it used the met_key '_external_image_url', but variation images don't seem to be working with WP All Import.

Everything else is setup correctly, as I was using an alternative plugin to import external images.

3 Answers
Kyle I. answered 3 years ago

Please ignore. Everything seems to be working fine now.

Dave Hilditch Staff answered 3 years ago

To clarify on the meta fields:

external_image_url is the field you import to. This is ideally pipe | separated list of image URLs, but it can also be comma separated. Preferably pipe though because some images on some CDNs will include commas.

The first of those images is loaded into the _external_image_url field as an image array.

The gallery images (everything after the first image from external_image_url) are loaded into the _ei_wcgallery field as an array of arrays. This approach makes it fast to pull those arrays in the correct format needed for WordPress.

If you later update the external_image_url field, there is an action hook added to update_post_meta and delete_post_meta which will rebuild the hidden _external_image_url and _ei_wcgallery fields.

So – basically, don’t import to the hidden fields – just import to the external_image_url field with pipe separation between image URLs and the plugin will handle the rest. That’s the same for everything – products, product variations, posts, custom posts etc.

If you are using custom posts, the custom posts need to declare gallery support in order for the gallery to work in custom posts.

Also – there is a bug in the currently live version when editing an existing custom post gallery – it won’t apply the changes currently – this is fixed in beta which is in your downloads area in My Accounts.

Mark Taylor replied 3 years ago

I second the option of being able to specify a main product image in one field, and gallery images in another field.. as an option but it would be great if but could work both ways

Dave H. Staff replied 3 years ago

They will be replaced. When the external_image_url field gets updated, it causes a function to run to update the hidden _external_image_url to be an array image version of whatever list of images is in external_image_url. The first image will be the featured image, all others will be gallery images. I did in the past have a separate field for gallery images and I could reintroduce this if you wish – this would mean that you could, optionally, keep 1 featured image in the external_image_url field and then your gallery images into a different meta field.

Kyle I. replied 3 years ago

Hi Dave, I have separate imports for featured and gallery images. I’ve imported all featured images to external_image_url. If I import all gallery images to external_image_url, will the featured image be replaced or will it just add additional images to the product gallery?

Aleš M. answered 3 years ago

Hello

Can images of product versions be imported with the WP All Import plug-in?

And how?

I am attaching a picture

Your Answer


Super Speedy Plugins
Logo