Answer the question
In order to leave comments, you need to log in
How to add value to billing_first_name field on checkout woocommece page?
I want to substitute the profile name in the billing_first_name field on the checkout page.
Please tell me how to do it with value.
Answer the question
In order to leave comments, you need to log in
<?php
add_filter( 'woocommerce_checkout_fields' , 'default_values_for_checkout_fields' );
function default_values_for_checkout_fields( $fields ) {
$fields['billing']['billing_first_name']['default'] = 'Name';
return $fields;
}
?>
unset($fields['billing']['billing_first_name']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question