You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Version 6.0.0 is a major version, there are several changes and improvements which affect the architecture of the plugin. You will have to re-configure the plugin, all the previous settings will be lost
16
16
17
17
## Changelog
18
+
* 6.11.0
19
+
* Variations : add new filter to modify variation's main image
18
20
* 6.10.0
19
21
* Orders : Redesigned the shipment tracking system.
20
22
* Orders (beta) : Add option to include VAT when importing orders.
@@ -315,7 +317,36 @@ function your_custom_fields_function($fields, $wc_product) {
315
317
```
316
318
317
319
### Variation Images
320
+
321
+
#### Main image
322
+
By default the variation's thumbnail is used as the main image in the feed.
323
+
324
+
You can customize the main image using the filter "shopping_feed_variation_main_image".
By default, we don’t support any custom plugin for adding images to WC Product Variation, with this filter you can set the desired images to each variation, you can use the following snippet
Version 6.0.0 is a major version, there are several changes and improvements which affect the architecture of the plugin. You will have to re-configure the plugin, all the previous settings will be lost
14
14
15
15
== Changelog ==
16
+
* 6.11.0
17
+
* Variations : add new filter to modify variation's main image
16
18
* 6.10.0
17
19
* Orders : Redesigned the shipment tracking system.
18
20
* Orders (beta) : Add option to include VAT when importing orders.
@@ -320,6 +322,34 @@ function your_custom_fields_function($fields, $wc_product) {
320
322
`
321
323
322
324
### Variation Images
325
+
326
+
#### Main image
327
+
By default the variation's thumbnail is used as the main image in the feed.
328
+
329
+
You can customize the main image using the filter "shopping_feed_variation_main_image".
By default, we don’t support any custom plugin for adding images to WC Product Variation, with this filter you can set the desired images to each variation, you can use the following snippet
$this->assertCount( 1, $sf_product->get_variations(), 'Variable product should have 1 variation.' );
417
+
$this->assertArrayHasKey( 'image_main', $sf_product->get_variations()[0], 'Variation should have an image_main key.' );
418
+
$this->assertEquals( 'https://example.com/image.jpg', $sf_product->get_variations()[0]['image_main'], 'Product main image should be equal to the custom value from the filter.' );
0 commit comments