WC_Abstract_Order::type_to_group()
Convert a type to a types group.
Method of the class: WC_Abstract_Order{}
Hooks from the method
Return
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->type_to_group( $type );
- $type(string) (required)
- type to lookup.
WC_Abstract_Order::type_to_group() WC Abstract Order::type to group code WC 8.7.0
protected function type_to_group( $type ) { $type_to_group = apply_filters( 'woocommerce_order_type_to_group', array( 'line_item' => 'line_items', 'tax' => 'tax_lines', 'shipping' => 'shipping_lines', 'fee' => 'fee_lines', 'coupon' => 'coupon_lines', ) ); return isset( $type_to_group[ $type ] ) ? $type_to_group[ $type ] : ''; }