I tried this PHP snippet and added into the functions.php file of my active theme.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
add_action( 'admin_footer', function(){ $screen = get_current_screen(); $screen_id = $screen ? $screen->id : ''; if ( ! in_array( $screen_id, array( 'product', 'edit-product' ) ) ) return; ?> <script type="text/javascript"> jQuery( function( $ ) { $( function() { // Disabled attribute ordering. $( '.product_attributes' ).sortable({ items: '.woocommerce_attribute', disabled: true }); $( '.woocommerce_attribute h3 .sort' ).css('display', 'none'); }); }); </script> <?php }, 999); |
Leave a Reply