Untitled

 avatar
unknown
plain_text
9 days ago
495 B
4
Indexable
add_action('admin_head', function(){
   ?>
   <script>
        jQuery(document).ready(function() {
            // Check if we're on the WooCommerce new product page
            if (jQuery('body').hasClass('post-new-php') && window.location.href.indexOf('post_type=product') > -1) {
                jQuery('#_separate_stock_quantities_b2b').val('no').trigger('change');
                jQuery('#_backorders_b2b').val('yes').trigger('change');
            }
        });
    </script>
   <?php 
});
Editor is loading...
Leave a Comment