Pre populate Woocommerce checkout fields
问题 I am trying to pre-populate additional fields in the woocommerce checkout page but I am struggling with it. add_filter('woocommerce_checkout_get_value', function($input, $key ) { global $current_user; switch ($key) : case 'billing_first_name': case 'shipping_first_name': return $current_user->first_name; break; case 'billing_last_name': case 'shipping_last_name': return $current_user->last_name; case 'billing_phone': return $current_user->phone; break; case 'billing_company': case 'shipping