The code snippet is as below:
$test = new PartnerRestrictionTransfer();
foreach($data as $data2)
{
$data = $test->setProductSku($data2);
}
print_r($data);die;
The code snippet is as below:
$test = new PartnerRestrictionTransfer();
foreach($data as $data2)
{
$data = $test->setProductSku($data2);
}
print_r($data);die;
Copyright © 2021 Jogjafile Inc.
You require to create new object every-time you get new value for $data2 variable. Also for readability you can use different name for your object variable.
Below is the updated code: