wogc/admin/manage_shop_order_column_data
Name: wogc/admin/manage_shop_order_column_data
Type: Action
Arguments: $post, $column_name
The filter can be used to render data for a custom created column on SuperAdmin Orders interface.
The following example render html for column called Products
add_action('wogc/admin/manage_shop_order_column_data', 'custom_wogc_admin_manage_shop_order_column_data', 10, 2); function custom_wogc_admin_manage_shop_order_column_data( $post, $column_name ) { if ( $column_name != 'products') return; $order = wc_get_order( $post->ID ); foreach( $order->get_items() as $key => $order_item ) { switch_to_blog( $order_item->get_meta('blog_id') ); printf( '<b>%s</b>', esc_html( $order_item->get_name() ) ); restore_current_blog(); } }
The code should be placed inside a php file on wp-content/mu-plugins folder.