How to Add a custom field on the gift card product edit page?

You can use the following code in functions.php for adding custom fields on the product edit page.

 

add_action('mwb_wgm_giftcard_product_type_field', 'mwb_wgm_create_custom_field');

function mwb_wgm_create_custom_field($product_id){

     woocommerce_wp_text_input(
          array(
               ‘id’ => ‘mwb_custom_price’,
               ‘value’ => “$custom_price”,
               ‘label’ => __( ‘Custom Price’, ‘your-theme’ ),
          )
     );

}

Was this Helpful ?

CONTACT

Ready to transform how you market your business

Let's get connected for a free consultation