Title: Default value based on current_user data
Last modified: June 23, 2020

---

# Default value based on current_user data

 *  Resolved [lendasdab42](https://wordpress.org/support/users/lendasdab42/)
 * (@lendasdab42)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/default-value-based-on-current_user-data/)
 * Before known this plugin, I was coding into functions.php file inside my theme
   directory to manage the checkout fields, adding a filter like this:
 *     ```
       add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
       function custom_override_checkout_fields( $fields ) {
           //do things with fields
           ...
   
           return $fields;
       }
       ```
   
 * But this plugin is way more intuitive, I want to use it! But I have one question:
 * **Can I add default value to the billing_first_name which will be based on `wp_get_current_user();`?**
 * On my custom code I mentioned before, I was able to do this:
 *     ```
       $current_user = wp_get_current_user();
       $fields['billing']['billing_first_name']['default'] = esc_html( $current_user->user_firstname );
       ```
   
 * and it worked very well.
    But I want to get rid of my code and use only this 
   plugin, can I add these “dynamic” default values?

Viewing 1 replies (of 1 total)

 *  Plugin Author [ThemeHigh](https://wordpress.org/support/users/themehigh/)
 * (@themehigh)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/default-value-based-on-current_user-data/#post-13098478)
 * Unfortunately, there is no option available in the lite version of our plugin
   to achieve your requirement.
 * Thank you!

Viewing 1 replies (of 1 total)

The topic ‘Default value based on current_user data’ is closed to new replies.

 * ![](https://ps.w.org/woo-checkout-field-editor-pro/assets/icon-256x256.gif?rev
   =3479964)
 * [Checkout Field Editor (Checkout Manager) for WooCommerce](https://wordpress.org/plugins/woo-checkout-field-editor-pro/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-checkout-field-editor-pro/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-checkout-field-editor-pro/reviews/)

## Tags

 * [default values](https://wordpress.org/support/topic-tag/default-values/)
 * [dynamic values](https://wordpress.org/support/topic-tag/dynamic-values/)

 * 1 reply
 * 1 participant
 * Last reply from: [ThemeHigh](https://wordpress.org/support/users/themehigh/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/default-value-based-on-current_user-data/#post-13098478)
 * Status: resolved