woocommerce_(order_type)_list_table_custom_column
Fires for each custom column for a specific order type. This hook takes precedence over the generic action manage_{$this->screen->id}_custom_column.
Использование
add_action( 'woocommerce_(order_type)_list_table_custom_column', 'wp_kama_woocommerce_order_type_list_table_custom_column_action', 10, 2 ); /** * Function for `woocommerce_(order_type)_list_table_custom_column` action-hook. * * @param string $column_name Identifier for the custom column. * @param \WC_Order $order Current WooCommerce order object. * * @return void */ function wp_kama_woocommerce_order_type_list_table_custom_column_action( $column_name, $order ){ // action... }
- $column_name(строка)
- Identifier for the custom column.
- $order(\WC_Order)
- Current WooCommerce order object.
Список изменений
С версии 7.3.0 | Введена. |
Где вызывается хук
woocommerce_(order_type)_list_table_custom_column
woocommerce/src/Internal/Admin/Orders/ListTable.php 184
do_action( 'woocommerce_' . $this->order_type . '_list_table_custom_column', $column_name, $order );