Reputation: 764
I would like to remove Virtual, Downloadable, Regular Price from Woocommerce product admin form. Any ideas on how to get this to work?
Upvotes: 1
Views: 1972
Reputation: 1683
It looks like there is no way to programmatically remove the fields from the woocommerce product admin pages. However you can remove them using CSS.
To do this start by editing the wp admin css, like this (add to functions.php):
add_action('admin_head', 'my_custom_admin_styles');
function my_custom_admin_styles() {
echo '<style>
</style>';
}
Then all you need to get the selectors for the fields you want to remove, the example below removes the 'regular price' field:
add_action('admin_head', 'my_custom_admin_styles');
function my_custom_admin_styles() {
// just add the css selectors below to hide each field as required
echo '<style>
.form-field._regular_price_field { display: none; }
</style>';
}
Upvotes: 1