How to execute a javascript function just before saving a Woocommerce post or a product?

In this tutorial we’ll learn how to execute a javascript function just before creating/saving a woocommerce product. To do this add the following lines of code at the end of your functions.php file. functionadmin_queue( $hook ) { global $post; if ( $hook == ‘post-new.php’ || $hook == ‘post.php’ ) { if ( ‘product’ === $post->post_type […]

How to execute a javascript function just before saving a Woocommerce post or a product? Read More »