I'm attempting to manipulate thr products array in the actionPresentOrder hook as follows:
public function hookActionPresentOrder($params)
{
foreach ($params['presentedOrder']['products'] as &$product) {
$product['image'] = 'test;
}
}
However, this produces the following error:
Notice: Indirect modification of overloaded element of PrestaShop\PrestaShop\Adapter\Presenter\Order\OrderLazyArray has no effect
Any suggestions on how to modify the products array would be welcomed.