File tree 5 files changed +11
-7
lines changed
5 files changed +11
-7
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.2.2 - 2020-06-15
2
+ ### Fixed
3
+ - Fix sync all products' data being null (via @PieterxJan )
4
+
1
5
## 1.2.1 - 2020-04-15
2
6
### Added
3
7
- Add "After build sync data" event to products, allowing for the manipulation of the data that is synced to Mailchimp (Closes #22 )
Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ Event::on(
64
64
\ether\mc\services\ProductsService::EVENT_AFTER_BUILD_SYNC_DATA,
65
65
function (\ether\mc\events\BuildSyncDataEvent $event) {
66
66
$event->element; // The element being synced
67
- $event->syncdata ; // The resulting data to sync
67
+ $event->syncData ; // The resulting data to sync
68
68
69
69
// For example, to modify the product description
70
- $event->syncdata ->description = $event->element->alternateDescriptionField;
70
+ $event->syncData ->description = $event->element->alternateDescriptionField;
71
71
}
72
72
);
73
73
```
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " ether/mailchimp-commerce" ,
3
3
"description" : " Mailchimp integration with Craft Commerce" ,
4
- "version" : " 1.2.1 " ,
4
+ "version" : " 1.2.2 " ,
5
5
"type" : " craft-plugin" ,
6
6
"keywords" : [
7
7
" mailchimp" ,
Original file line number Diff line number Diff line change @@ -24,6 +24,6 @@ class BuildSyncDataEvent extends Event
24
24
public $ element ;
25
25
26
26
/** @var array */
27
- public $ syncdata ;
27
+ public $ syncData ;
28
28
29
29
}
Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ class ProductsService extends Component
46
46
* \ether\mc\services\ProductsService::EVENT_AFTER_BUILD_SYNC_DATA,
47
47
* function (\ether\mc\events\BuildSyncDataEvent $event) {
48
48
* $event->element; // The element being synced
49
- * $event->syncdata ; // The resulting data to sync
49
+ * $event->syncData ; // The resulting data to sync
50
50
* }
51
51
* );
52
52
*/
@@ -348,11 +348,11 @@ private function _buildProductData ($productId)
348
348
349
349
$ event = new BuildSyncDataEvent ([
350
350
'element ' => $ product ,
351
- 'syncdata ' => $ data ,
351
+ 'syncData ' => $ data ,
352
352
]);
353
353
$ this ->trigger (self ::EVENT_AFTER_BUILD_SYNC_DATA , $ event );
354
354
355
- return $ event ->syncdata ;
355
+ return $ event ->syncData ;
356
356
}
357
357
358
358
/**
You can’t perform that action at this time.
0 commit comments