WordPress – Add custom input field next to WooCommerce product variation SKU field
I have created a custom field for variations of a variant product add_action('woocommerce_variation_options', 'my_field_variable', 300, 3); function my_field_variable($loop, $variation_data, $variation){ woocommerce_wp_text_input( array( 'id' => "_customscu", 'value' => get_post_meta($variation->ID, '_customscu', true), 'label' => esc_html__('CustomSCU', 'my_field'), 'desc_tip' => true, 'description' => __('Enter…