woocommerce_order_type_to_group
Convert a type to a types group.
Usage
add_filter( 'woocommerce_order_type_to_group', 'wp_kama_woocommerce_order_type_to_group_filter' ); /** * Function for `woocommerce_order_type_to_group` filter-hook. * * @param string $type type to lookup. * * @return string */ function wp_kama_woocommerce_order_type_to_group_filter( $type ){ // filter... return $type; }
- $type(string)
- type to lookup.
Where the hook is called
woocommerce_order_type_to_group
woocommerce/includes/abstracts/abstract-wc-order.php 853-862
$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', ) );