Last active
November 6, 2017 07:22
-
-
Save bhavik-kiri/8193b3f48f3f1a23e49b85ced84e9edc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_action( 'woocommerce_product_data_panels', 'wcpt_gift_card_options_product_tab_content' ); | |
function wcpt_gift_card_options_product_tab_content() { | |
// Dont forget to change the id in the div with your target of your product tab | |
?><div id='gift_card_options' class='panel woocommerce_options_panel'><?php | |
?><div class='options_group'><?php | |
woocommerce_wp_checkbox( array( | |
'id' => '_enable_gift_card', | |
'label' => __( 'Enable Gift Card Product', 'wcpt' ), | |
) ); | |
woocommerce_wp_text_input( array( | |
'id' => '_gift_card_price', | |
'label' => __( 'Price', 'wcpt' ), | |
'placeholder' => '', | |
'desc_tip' => 'true', | |
'description' => __( 'Enter Gift Card Price.', 'wcpt' ), | |
)); | |
?></div> | |
</div><?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment