Attachments.php
1 week ago
Attributes.php
1 week ago
DownloadableFiles.php
1 week ago
Linked.php
1 week ago
Meta.php
1 week ago
Post.php
1 week ago
Stock.php
1 week ago
Synchronizer.php
1 week ago
SynchronizerForMeta.php
1 week ago
Taxonomies.php
1 week ago
VariationAttachments.php
1 week ago
VariationMeta.php
1 week ago
VariationTaxonomies.php
1 week ago
Variations.php
1 week ago
Attachments.php
15 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WCML\Synchronization\Component; |
| 4 | |
| 5 | class Attachments extends Synchronizer { |
| 6 | |
| 7 | public function run( $product, $translationsIds, $translationsLanguages ) { |
| 8 | foreach ( $translationsLanguages as $translationId => $language ) { |
| 9 | $this->woocommerceWpml->media->sync_thumbnail_id( $product->ID, $translationId, $language ); |
| 10 | $this->woocommerceWpml->media->sync_product_gallery( $product->ID, $translationId, $language ); |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | } |
| 15 |