Need to Add a default city and state in the checkout page

This topic has 2 replies, 2 voices, and was last updated 2 years, 7 months ago ago by Olga Barlow

  • Avatar: Ansar
    Ansar
    Participant
    November 30, 2021 at 20:16

    Hi, I am developing a delivery website and I deliver only in city, so during the checkout I want to add the city and state name by default and no give the user the option to edit it: https://prnt.sc/214teks – check this right now it’s editable
    I have searched and tried many codes from stack overflow, somewhere I am doing a mistake!

    Kindly help me out – share a code that I can add in my functions.php file of my theme editor which will make both the billing and shipping values of city and state as KADAPA and ANDHRA PRADESH respectively!

    I will be really grateful!

    Please, contact administrator
    for this information.
    1 Answer
    Avatar: Olga Barlow
    Olga Barlow
    Support staff
    December 1, 2021 at 15:54

    Hello,

    Checkout is the default WooCommerce option, our theme does not have any special options for this. Additional PHP customization is outside the scope of our support, unfortunately https://themeforest.net/page/item_support_policy

    So, try WooCommerce Snippet https://woocommerce.com/document/change-the-default-state-and-country-on-the-checkout/ and contact WooCommerce support if that does not help https://wordpress.org/support/plugin/woocommerce/

    Regards

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.