woocommerce_get_order_status_labels хук-фильтрWC 9.1.0

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

Использование

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(массив)
Order actions.
$order(WC_Order)
Current order object.

Список изменений

С версии 9.1.0 Введена.

Где вызывается хук

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

Где используется хук в WooCommerce

Использование не найдено.