Add a custom column to WooCommerce admin orders page with HPOS enabled

I want to have a custom column in my WooCommerce admin orders page. it's about WHO CREATED AN ORDER ( actually I want the author name ). With HPOS in WooCommerce I cant Use the normall codes. beacuse tables of woocommerce has chagned. function add_wc_order_list_custom_column( $columns ) { $new_columns = array(); foreach ( $columns as $column_name => $column_info ) { $new_columns[ $column_name ] = $column_info; if ( 'order_status' === $column_name ) { $new_columns['custom_order_list_action'] = 'Custom Column'; } } return $new_columns; } function display_wc_order_list_custom_column_content( $column, $order ) { if ( $column == 'custom_order_list_action' ) { $author_id = $order->get_customer_id(); $author = get_userdata( $author_id ); echo $author ? $author->display_name : 'Unknown Author'; } } Thanks for your help . . . I've tried so many ways from Ai,forums and etc and I want from Programmers to help me with this problem.

Comment (0)

You’ll be in good company