Skip to main content

For woocommerce orders I needed to use the filter: manage_edit-shop_order_columns.

add_filter( 'manage_edit-shop_order_columns', 'manage_shop_order_posts_columns', 10, 1 );
function manage_shop_order_posts_columns($columns) {
    $columns['test'] = 'Test';
    return $columns;
}

Then to populate the field:

add_action( 'manage_shop_order_posts_custom_column' , 'manage_shop_order_custom_column', 10, 2 );
function manage_shop_order_custom_column($column, $post_id) {
    switch ( $column )
    {
        case 'test' :
            echo '1234';
            break;
    }
}

For woocommerce orders I needed to use the filter: manage_edit-shop_order_columns.

add_filter( 'manage_edit-shop_order_columns', 'manage_shop_order_posts_columns', 10, 1 );
manage_shop_order_posts_columns($columns) {
    $columns['test'] = 'Test';
    return $columns;
}

Then to populate the field:

add_action( 'manage_shop_order_posts_custom_column' , 'manage_shop_order_custom_column', 10, 2 );
function manage_shop_order_custom_column($column, $post_id) {
    switch ( $column )
    {
        case 'test' :
            echo '1234';
            break;
    }
}

For woocommerce orders I needed to use the filter: manage_edit-shop_order_columns.

add_filter( 'manage_edit-shop_order_columns', 'manage_shop_order_posts_columns', 10, 1 );
function manage_shop_order_posts_columns($columns) {
    $columns['test'] = 'Test';
    return $columns;
}

Then to populate the field:

add_action( 'manage_shop_order_posts_custom_column' , 'manage_shop_order_custom_column', 10, 2 );
function manage_shop_order_custom_column($column, $post_id) {
    switch ( $column )
    {
        case 'test' :
            echo '1234';
            break;
    }
}
Source Link

For woocommerce orders I needed to use the filter: manage_edit-shop_order_columns.

add_filter( 'manage_edit-shop_order_columns', 'manage_shop_order_posts_columns', 10, 1 );
manage_shop_order_posts_columns($columns) {
    $columns['test'] = 'Test';
    return $columns;
}

Then to populate the field:

add_action( 'manage_shop_order_posts_custom_column' , 'manage_shop_order_custom_column', 10, 2 );
function manage_shop_order_custom_column($column, $post_id) {
    switch ( $column )
    {
        case 'test' :
            echo '1234';
            break;
    }
}