I am trying hide / unset the 'Downloadable' and 'Virtual' checkbox options from Woocommerce entirely. I have managed to unset them everywhere EXCEPT in the Woocommerce Variations Panel here:
Looking in the Woocommerce plugin files I can see an action hook called 'woocommerce_variation_options' which seems to spit out the options for these checkboxes. I can obviously do a "dirty" injection of CSS here but whats the correct method to unset these checkboxes?
I am looking for something like this:
add_action( 'woocommerce_variation_options', 'my_customize_variation_fields_func', 10, 3 );
function my_customize_variation_fields_func( $loop, $variation_data, $variation ){
// Remove / Unset "Virtual" checkbox
// Remove / Unset "Downloadable" checkbox
}
I have tried using unset( $variation[ 'virtual' ] );
here but does not work? Any help / advice appreciated :-)