chore: fix adding additional attributes

This commit is contained in:
Joel Male
2022-06-29 08:58:24 +10:00
parent cdf55fa8bf
commit ebac71996c
2 changed files with 122 additions and 73 deletions
+3 -7
View File
@@ -41,13 +41,9 @@ public function addItem(array $item): bool
}
}
$product = [
'id' => $item['id'],
'link' => $item['link'],
'title' => $item['title'],
'price' => $item['price'],
'image_link' => $item['image_link'],
];
foreach ($item as $key => $value) {
$product[$key] = $value;
}
$this->products[] = $product;