Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add_action( 'woocommerce_product_options_general_product_data', 'wc_custom_add_custom_fields' );
function wc_custom_add_custom_fields() {
// Print a custom text field
woocommerce_wp_text_input( array(
'id' => '_custom_text_field',
'label' => 'Custom Text Field',
'description' => 'This is a custom field, you can write here anything you want.',
'desc_tip' => 'true',
'placeholder' => 'Custom text'
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.