The custom fields section can be confusing for novice users and the download permissions section is only necessary if downloadable products are on offer. This code hides both of those meta boxes.
/*
* Remove custom fields and download meta boxes on order details page
*/
add_action('add_meta_boxes', 'sc_remove_order_meta_boxes', 90);
function sc_remove_order_meta_boxes() {
remove_meta_box('postcustom', 'shop_order', 'normal');
remove_meta_box('woocommerce-order-downloads', 'shop_order', 'normal');
}
View Raw
Code ID: 91016