global $user;
$type = 'billing';
$account = $user->uid;
$phone = '8953888';$new_profile = commerce_customer_profile_new($type);
$wrapper = entity_metadata_wrapper('commerce_customer_profile', $new_profile);
$wrapper->uid = $account;$wrapper->field_commerce_check_telefon = $phone;
commerce_customer_profile_save($new_profile);
// Profit ;)
Комментарии
Если у вас есть вопрос, критика или другое мнение - напишите в комментариях.