skip to Main Content

WordPress – Display WooCommerce selected variation additional fee from custom field

Based on Product custom field to enable a specific fee in Woocommerce answer, I have the following code: // Create and display Backend Product custom field add_action('woocommerce_product_options_general_product_data', 'ba_adding_custom_product_general_field'); function ba_adding_custom_product_general_field() { global $woocommerce, $post; echo '<div class="options_group">'; // Custom fields…

VIEW QUESTION

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…

VIEW QUESTION
Back To Top
Search