• Resolved lucasln1

    (@lucasln1)


    Hi when I click to checkout and go to the payment page , the billing name that is on the order overwrite’s the account name on >myaccount>edit account , and i dont want it that , do you guys know what to do ?

    Image to illustrate https://i.imgur.com/jT6EcOz.png

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try this code snippet:

    add_action( 'woocommerce_checkout_fields', 'readonly_billing_names', 10, 1 );
    function readonly_billing_names( $checkout_fields ) {
      $checkout_fields['billing']['billing_first_name']['custom_attributes'] = array( 'readonly' => 'readonly' );
      $checkout_fields['billing']['billing_last_name']['custom_attributes'] = array( 'readonly' => 'readonly' );
      return $checkout_fields;
    }

    Works for me but another guy said it didn’t work so maybe sometimes its affected by the theme.

    Thread Starter lucasln1

    (@lucasln1)

    Already tried this and didnt work , but thanks

    Plugin Support Stuart Duff – a11n

    (@stuartduff)

    Automattic Happiness Engineer

    Hi @lucasln1,

    If the code Lorro referenced did not work for you it’s likely related to your theme or maybe even a plugin you’re currently using on your site.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Billing Name Overwrites’ Account Name’ is closed to new replies.