Skip to content

Commit c69723b

Browse files
committed
Fix commerce_order hook namespacing.
1 parent b97461a commit c69723b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

modules/order/commerce_order.module

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ function commerce_order_mail($key, &$message, $params) {
205205
* This is an alternative to locking the field which still leaves
206206
* the field editable.
207207
*/
208-
function commerce_product_field_storage_config_access(FieldStorageConfigInterface $field_storage, $operation) {
208+
function commerce_order_field_storage_config_access(FieldStorageConfigInterface $field_storage, $operation) {
209209
if ($field_storage->id() == 'profile.address' && $operation == 'delete') {
210210
return AccessResult::forbidden();
211211
}
@@ -217,7 +217,7 @@ function commerce_product_field_storage_config_access(FieldStorageConfigInterfac
217217
*
218218
* Hides the "Storage settings" operation for the profile 'address' field.
219219
*/
220-
function commerce_product_entity_operation_alter(array &$operations, EntityInterface $entity) {
220+
function commerce_order_entity_operation_alter(array &$operations, EntityInterface $entity) {
221221
if ($entity->getEntityTypeId() == 'field_config' && $entity->id() == 'profile.customer.address') {
222222
unset($operations['storage-settings']);
223223
}
@@ -229,7 +229,7 @@ function commerce_product_entity_operation_alter(array &$operations, EntityInter
229229
* Hides the 'Available countries' setting for the profile 'address' field.
230230
* The setting is unused because in Commerce it is taken from the store.
231231
*/
232-
function commerce_product_form_field_config_edit_form_alter(array &$form, FormStateInterface $form_state) {
232+
function commerce_order_form_field_config_edit_form_alter(array &$form, FormStateInterface $form_state) {
233233
/** @var \Drupal\Core\Field\FieldConfigInterface $entity */
234234
$entity = $form_state->getFormObject()->getEntity();
235235
if ($entity->id() == 'profile.customer.address') {

0 commit comments

Comments
 (0)