diff --git a/modules/order/commerce_order.install b/modules/order/commerce_order.install index d29bb23..4e139e8 100644 --- a/modules/order/commerce_order.install +++ b/modules/order/commerce_order.install @@ -458,3 +458,11 @@ function commerce_order_update_7108() { return t('Schema for the commerce_order and commerce_order_revision tables has been updated.'); } +/** + * Lock the default Customer Billing Information for Order. + */ +function commerce_order_update_7109() { + db_query("UPDATE {field_config} SET locked = 1 WHERE field_name = 'commerce_customer_billing';"); + + return t('Customer Billing Information for Order locked.'); +} \ No newline at end of file diff --git a/modules/order/commerce_order.module b/modules/order/commerce_order.module index d7707f1..00df918 100644 --- a/modules/order/commerce_order.module +++ b/modules/order/commerce_order.module @@ -232,6 +232,9 @@ function commerce_order_configure_customer_profile_type($customer_profile_type, 'profile_type' => $customer_profile_type, ), ); + if ($customer_profile_type == 'billing') { + $field += array('locked' => TRUE); + } $field = field_create_field($field); }