I have added the SKU field to my General Tab under Product Data in the Admin panel – see image 1.
I want to be able to position the SKU box/field above the Regular Price field but cannot figure out how. (Fig 2)
Required Layout
The code used is shown below.
// Saving the Custom Admin Field in general tab products pages when submitted
add_action( ‘woocommerce_process_product_meta’, ‘save_the_sku_to_general_product_field’ );
function save_the_sku_to_general_product_field( $post_id ){
$wc_field = $_POST['_sku'];
if( !empty($wc_field))
update_post_meta( $post_id, '_sku', esc_attr( $wc_field ) );
}
Read more here: Woocommerce admin Product Data Field Positions