How to remove woocommerce product list columns in admin?
Many times it is useful to remove some columns from product list in admin. We might want to hide price or tags or anything we are not using so the backend is more simple.
We just need to paste the following code in our functions.php file (or any other file we are properly calling)
add_filter( 'manage_edit-product_columns', function( $columns ) {
unset( $columns['thumb'] ); // φωτογραφία προϊόντος
unset( $columns['name'] ); // όνομα προϊόντος
unset( $columns['price'] ); // τιμή
unset( $columns['sku'] ); // κωδικός αποθήκης
unset( $columns['is_in_stock'] ); // στοκ
unset( $columns['product_cat'] ); // κατηγορίες
unset( $columns['product_tag'] ); // tags, ετικέτες
unset( $columns['featured'] ); // featured είδος
unset( $columns['date'] ); // ημερομηνία
return $columns;
}, 10, 1 );
We can safely comment any line we don’t want to hide.