I'm trying to find a woocommerce method that will allow me to set the billing and or shipping first name.
The customer class will allow me to set some fields but not first_name. Anyone know if a method exists or do I need to just update the wp_usermeta table directly using billing_first_name.
Here is an example of what doesn't work:
global $woocommerce;
$user_first_name = get_user_meta( $user_id, 'first_name', true );
if( !empty( $woocommerce->customer->get_billing_first_name() ) ) {
$woocommerce->customer->set_billing_first_name($user_first_name); // a set_billing_first_name method doesn't exist
}