So I’ve got the following function to add a barcode field in the Product Inventory tab. However this field is being added after all the other content, and I would like to have this before the SKU code.

function add_barcode(){
    global $woocommerce,$post;
            'id'          => '_barcode',
            'label'       => __('Barcode','woocommerce'),
            'placeholder' => 'Scan Barcode',
            'desc_tip'    => 'true',
            'description' => __('Scan barcode.','woocommerce')

Is there anyway to place the function/field before the SKU aka before the actual hook, like something in terms of woocommerce_before_product_options_inventory_product_data?

Thanks for any suggestions in advance.

Read more here: WooCommerce: Reorder fields in backend product options edit page


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: