• I am trying to create a custom column which displays product weight in the backend admin area of my woocommerce shop. I have created a simple plugin which is currently adding a column and inserting the chosen data.

    Where i try and select [‘weight’] it is currently not bringing up any data. This field works fine with author, date and a couple of other bits. However trying to add woocommerce data just brings up a blank field. I have tried a few different codes and no luck.

    Any ideas how I can rectify? Apologies for my inexperience, maybe I am going about this the complete wrong way? Thanks in advance

    <?php 
    add_filter( 'manage_product_posts_columns', 'primo_filter_posts_columns' );
    function primo_filter_posts_columns( $columns ) {
      $columns ['weight'] = __('Weight');
      return $columns;
    } ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Create Weight Column On Admin Screen’ is closed to new replies.