$propertyCollection = $order->getPropertyCollection();
foreach ($propertyCollection->getGroups() as $group)
{
foreach ($propertyCollection->getGroupProperties($group['ID']) as $property)
{
$p = $property->getProperty();
if($p["CODE"] == "LOCATION")
$property->setValue($location);
}
}
// Устанавливаем свойства
$info = ['YOUR_FAMILY'=>$name,'YOUR_PHONE'=>$phone,'YOUR_EMAIL'=>$email, 'LOCATION' => $location];
$c = $order->getPropertyCollection();
foreach($c->getGroups() as $g) foreach($c->getGroupProperties($g['ID']) as $p) {
$a = $p->getProperty()['CODE'];
if(isset($info[$a])) $p->setValue($info[$a]);
}