WordPress at Your Fingertips
function is not described

WC_Abstract_Order::type_to_group() protected WC 1.0

Convert a type to a types group.

{} It's a 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.

Code of WC_Abstract_Order::type_to_group() WC 5.8.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 ] : '';
}