woocommerce_get_order_status_labels filter-hookWC 9.1.0

Provides an opportunity to modify and extend the order status labels.

Usage

add_filter( 'woocommerce_get_order_status_labels', 'wp_kama_woocommerce_get_order_status_labels_filter', 10, 2 );

/**
 * Function for `woocommerce_get_order_status_labels` filter-hook.
 * 
 * @param array    $action Order actions.
 * @param WC_Order $order  Current order object.
 *
 * @return array
 */
function wp_kama_woocommerce_get_order_status_labels_filter( $action, $order ){

	// filter...
	return $action;
}
$action(array)
Order actions.
$order(WC_Order)
Current order object.

Changelog

Since 9.1.0 Introduced.

Where the hook is called

ListTable::get_order_status_label()
woocommerce_get_order_status_labels
woocommerce/src/Internal/Admin/Orders/ListTable.php 1228
$status_names = apply_filters( 'woocommerce_get_order_status_labels', $status_names, $order );

Where the hook is used in WooCommerce

Usage not found.