• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/delivery/services/recipientdataprovider.php
  • Класс: BitrixSaleDeliveryServicesRecipientDataProvider
  • Вызов: RecipientDataProvider::getContactFromOrder
static function getContactFromOrder(Order $order): ?Contact
{
	$contact = new Contact();

	$buyerName = $order->getPropertyCollection()->getAttribute('IS_PAYER');
	if ($buyerName)
	{
		$contact->setName((string)$buyerName->getValue());
	}

	$buyerPhone = $order->getPropertyCollection()->getAttribute('IS_PHONE');
	if ($buyerPhone)
	{
		$contact->addPhone(new Phone('OTHER', (string)$buyerPhone->getValue()));
	}

	return $contact;
}