I want to customize the columns in Woocommerce admin area when viewing the product list.
Specifically, I want to remove some columns, and add several custom field columns.
I tried many solutions listed online, and I can remove columns and add new ones like this:
add_filter( 'manage_edit-product_columns', 'show_product_order',15 );
function show_product_order($columns){
//remove column
unset( $columns['tags'] );
//add column
$columns['offercode'] = __( 'Offer Code');
return $columns;
}
But how do I populate the new column with the actual product data (in this case, a custom field called 'offercode')?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…