• Resolved Eliyahna

    (@eliyahna)


    @serafinnyc, I saw on this thread where you gave code that made the default billing address blank. I had the same problem and your code worked great for me. However, the “SHIP TO A DIFFERENT ADDRESS?” field is still showing my shop state by default. What can I add to your code to make that field not show any default as well? (Yes I have geolocation chosen in settings, it’s not working).

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Eliyahna

    (@eliyahna)

    SOLVED. This code worked for me: I’m sure it will have to be altered to reflect your field value(s)…

    add_filter( ‘default_checkout_billing_country’, ‘change_default_checkout_country’ );
    add_filter( ‘default_checkout_billing_state’, ‘change_default_checkout_state’ );
    add_filter( ‘default_billing_dealer_city_state’, ‘change_billing_dealer_city_state’ );
    function change_default_checkout_country() {
    return ”; // country code
    }

    function change_default_checkout_state() {
    return ”; // state code
    }
    function change_default_billing_dealer_city_state() {
    return ”; // state code
    }


    • This reply was modified 1 year, 2 months ago by Eliyahna.
    Stef

    (@serafinnyc)

    @eliyahna glad you figured it out. Sorry for the delay I’m on a surfing trip.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Ship To Different Address Field’ is closed to new replies.