manage_(screen_id)_custom_column хук-событиеWC 7.0.0

Fires for each custom column in the Custom Order Table in the administrative screen.

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

add_action( 'manage_(screen_id)_custom_column', 'wp_kama_manage_screen_id_custom_column_action', 10, 2 );

/**
 * Function for `manage_(screen_id)_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_manage_screen_id_custom_column_action( $column_name, $order ){

	// action...
}
$column_name(строка)
Identifier for the custom column.
$order(\WC_Order)
Current WooCommerce order object.

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

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

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

ListTable::column_default()
manage_(screen_id)_custom_column
woocommerce/src/Internal/Admin/Orders/ListTable.php 109
do_action( "manage_{$this->screen->id}_custom_column", $column_name, $order );

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

woocommerce/includes/admin/class-wc-admin-taxonomies.php 69
add_filter( 'manage_product_cat_custom_column', array( $this, 'product_cat_column' ), 10, 3 );
woocommerce/includes/admin/list-tables/abstract-class-wc-admin-list-table.php 51
add_action( 'manage_' . $this->list_table_type . '_posts_custom_column', array( $this, 'render_columns' ), 10, 2 );
woocommerce/src/Internal/Admin/Orders/ListTable.php 75
add_action( 'manage_' . wc_get_page_screen_id( 'shop-order' ) . '_custom_column', array( $this, 'render_column' ), 10, 2 );