WooCommerce/WordPress: how hide entire table form after submit (Admin Dashboard)?

So I would take of on your html form the onsubmit()=…, once isnt needed and your javascript function should only have something like this. document.getElementById(“form_1”).style.display = “none”; or document.getElementById(“form_1”).style.visibility = “hidden”; this should do the job, if for some reason it does not, change the onclick from the input to the form tag. Your code … Read more

Issue adding sub category programmatically

with this code we add a new main category wp_insert_term( ‘My New Category’, ‘product_cat’, array(‘parent’ => 0)); then knowing the category parent id we can add a sub category like so wp_insert_term( ‘My New Sub-category’, ‘product_cat’, array(‘parent’ => 72)); this is more or less what you have, but when I run the function get_terms I … Read more

How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]

I haven’t tested but something like this should work: function wpse70000_add_author_metabox_to_cpt_book( $args, $post_type ) { if (‘product’ === $post_type ){ unset($args[‘editor’] ); // set the ‘supports’ array } return $args; } add_filter( ‘register_post_type_args’, ‘wpse70000_add_author_metabox_to_cpt_book’, 10, 2 );