Created
September 19, 2015 07:08
-
-
Save SirDarcanos/53c751262610b60f1144 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
add_action( 'woocommerce_process_product_meta', 'wc_custom_save_custom_fields' ); | |
function wc_custom_save_custom_fields( $post_id ) { | |
if ( ! empty( $_POST['_custom_text_field'] ) ) { | |
update_post_meta( $post_id, '_custom_text_field', esc_attr( $_POST['_custom_text_field'] ) ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment