Last active
June 14, 2019 13:23
-
-
Save plugin-republic/4cdd159cb665b6c61fdd6c00f0f183e7 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 | |
/** | |
* Display a custom text field | |
* @since 1.0.0 | |
*/ | |
function cfwc_create_custom_field() { | |
woocommerce_wp_text_input( | |
array( | |
'id' => 'custom_text_field_title', | |
'label' => __( 'Custom Text Field Title', 'cfwc' ), | |
'class' => 'cfwc-custom-field', | |
'desc_tip' => true, | |
'description' => __( 'Enter the title of your custom text field.', 'ctwc' ), | |
) | |
); | |
} | |
add_action( 'woocommerce_product_options_general_product_data', 'cfwc_create_custom_field' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment