Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- woocommerce_form_field('myName', array(
- 'type' =>'text',
- 'class'=>array('my-field-class form-row-wide'),
- 'label'=>__('First Name'),
- 'placeholder'=>__('Please enter your name'),
- ), $checkout->get_value('myName'));
- /*Update the info with the checkout*/
- add_action('woocommerce_checkout_field_update_order_meta','my_custom_checkout_field_update_meta');
- function my_custom_checkout_field_update_meta($order_id){
- if($_POST['MyName'])
- update_post_meta($order_id, 'First Name',esc_attr($POST['MyName']));
- }
Add Comment
Please, Sign In to add comment