I am trying to remove the field and add in a different location but it is not saving in billing detail. Please guide me how can i fix this.
Code
add_filter('woocommerce_checkout_fields', 'quadlayers_remove_checkout_fields');
function quadlayers_remove_checkout_fields($fields)
{
unset($fields['billing']['billing_first_name']);
return $fields;
}
add_action('woocommerce_checkout_order_review', 'checkout_review_order_custom_field');
function checkout_review_order_custom_field()
{
woocommerce_form_field('billing_first_name', array(
'type' => 'text',
'class' => array(''),
'label' => __('Name', 'sidesmedia'),
'placeholder' => 'Card Holder Name',
'required' => true,
));
}
Any solution appreciated!