← All changes
|
modules/variables/utils/template-library-variables-snapshot-builder.php
+3
-1
4.0.9
→
4.3.1
View file →
| @@ -167,14 +167,16 @@ | ||
| 167 | 167 | } |
| 168 | 168 | return $count; |
| 169 | 169 | } |
| 170 | 170 | |
| 171 | - protected function save_data( array $items, array $metadata ): array { | |
| 171 | + protected function save_data( array $data, array $metadata ): array { | |
| 172 | 172 | $repository = $this->get_repository_or_null(); |
| 173 | 173 | |
| 174 | 174 | if ( ! $repository ) { |
| 175 | 175 | return []; |
| 176 | 176 | } |
| 177 | + | |
| 178 | + $items = $data['updated_items'] ?? []; | |
| 177 | 179 | |
| 178 | 180 | $updated_collection = Variables_Collection::hydrate( [ |
| 179 | 181 | 'data' => $items, |
| 180 | 182 | 'watermark' => $metadata['watermark'] ?? 0, |