You are here

function commerce_order_add_order_items_field in Commerce Core 8.2

Adds the default order_items field to an order type.

Parameters

\Drupal\commerce_order\Entity\OrderTypeInterface $order_type: The order type.

Deprecated

in commerce:8.x-2.16 and is removed from commerce:3.x. The order items field is now a base field.

See also

https://www.drupal.org/node/3090561

File

modules/order/commerce_order.module, line 203
Defines the Order entity and associated features.

Code

function commerce_order_add_order_items_field(OrderTypeInterface $order_type) {
  @trigger_error('commerce_order_add_order_items_field() function is deprecated in commerce:8.x-2.16 and is removed from commerce:3.x. The order_items field is now a base field. See https://www.drupal.org/node/3090561', E_USER_DEPRECATED);
}