Skip to content

Instantly share code, notes, and snippets.

@Musilda
Last active October 18, 2021 06:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Musilda/d38e2f4f1d11f66764d065ba74695700 to your computer and use it in GitHub Desktop.
Save Musilda/d38e2f4f1d11f66764d065ba74695700 to your computer and use it in GitHub Desktop.
<?php
add_filter( 'manage_shop_order_posts_columns', 'musilda_custom_order_column', 11 );
function musilda_custom_order_column( $columns ) {
$expanded_columns = [];
foreach ( $columns as $key => $value ) {
$expanded_columns[$key] = $value;
if ( $key == 'name' ) {
$expanded_columns['order-weight'] = __( 'Weight', 'musilda' );
}
}
return $expanded_columns;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment