First/Last name not set in the checkout form

Home Forums Jevelin Theme First/Last name not set in the checkout form

Home Forums Jevelin Theme First/Last name not set in the checkout form

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    RESOLVED Posts
  • CBDFactum
    Participant

    Email for testing: [email protected]

    Password: in the private field

    Site: https://cbdfactum.com

     

    When you put a product into the shopping cart and try to check out and log in, then the first & last name fields are not set.

     

    I tested it without any additional plugins. It doesn’t appear, so the plugins shouldn’t be the reason.

     

    Did I misunderstand something that it is not set or should it be set with the first & last name from the account?

    Hi @CBDFactum,

     

    I hope you are well today and thank you for your question.

     

    This is WooCommerce plugin related question so please contact the plugin support to resolve it.

     

    Best regards,
    Shufflehound team

    CBDFactum
    Participant

    Solution for this topic

    I confirm it has nothing to do with your theme. I present here the solution so it is available for others. The code has to be placed in functions.php:

    function populate_specific_checkout_field($input, $key ) {
     global $current_user;
     switch( $key ) {
      case 'billing_first_name':
      case 'shipping_first_name':
       // return the first name
       return $current_user->first_name;
    
      case 'billing_last_name':
      case 'shipping_last_name':
       // return the last name
       return $current_user->last_name;
     }
    }
    add_filter('woocommerce_checkout_get_value', 'populate_specific_checkout_field', 15, 2 );

    Awesome great to see you got that resolved.

     

    Please advise if you have more questions.

     

    Have a fantastic day!

Viewing 4 posts - 1 through 4 (of 4 total)

Popular choice

Professional Developers At Your Fingertips!

If you need services beyond standard support, we've got your back!

Services we offer:

Demo setup
Advanced customization
Layout adjustment
Graphic work / visualizations
Custom coding
Full WordPress development and design

Services

What we can offer

  • Demo setup +

    If you'd prefer not to handle the installation yourself or need help getting started, we'll set everything up for you.

  • Layout adjustment +

    We'll help you rearrange sections, adjust spacing, and modify the page structure to fit your needs.

  • Advanced customization +

    More complex styling changes, theme option modifications, and third-party integrations.

  • Custom coding +

    If you need something that's not included in the theme, we can code it for you.

  • Graphic work / visualizations +

    Web design services to create custom sections, pages, and blocks for your theme, plus graphics and visualizations.

  • Full WordPress development and design +

    Full website builds, custom theme development, or plugin creation from scratch.

  • About pricing +

    We'll provide a clear quote based on what you need. No hidden fees.

Professional Developers At Your Fingertips!

Custom Work Form