• shix86

    (@shix86)


    Hi,

    after upgrading WooCCM, I’m not able to remove required State / Country field.
    Went in CCM, marked Remove Field Entirely, it won’t remove it from biling section.
    Worked before upgrading.

    Anyone, developers?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter shix86

    (@shix86)

    WooCCM Version 3.6.6

    I also can’t remove those … which surprised me. But for now I can live with it, since I just installed the plugin yesterday and to me the it’s a massive improvement over having all the fields there!!

    Tamhas Buchan
    AlphaPress

    Thread Starter shix86

    (@shix86)

    Hello Tamhas,
    I made this by adding filter function in Functions.php file. See below:

    add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );
    function custom_override_checkout_fields( $fields ) {
    unset($fields[‘billing’][‘billing_country’]);
    unset($fields[‘billing’][‘billing_state’]);
    return $fields;
    }

    It removed state and country since I don’t need them both in my orders.

    Thanks Shix86, but where can I find that functions.php file? Not the one in the folder of active theme? And where in the file can I insert it?

    Thread Starter shix86

    (@shix86)

    Hi Tamhas,

    when you log in on your WP dashboard, you need to find Appearance -> Editor and locate file named ‘Theme Functions (functions.php)’ on the right side.

    You can paste the code above at the end of that file and that’s all.

    Regards.

    Hi! I noticed after all without doing that the State and Country fields disappeared. And everything worked fine, without people having to fill in all the stuff Paypal express was going to send back anyway, except for email and phone which were still there.

    Then today, the plugin came out with a 3.6.8, and the email and phone fields are also gone… except now once a Paypal express transaction express is completed and returns to the Place Order page, it says “please provide a valid email”.

    And going into the plugin settings, it’s completely different, it no longer has all the list of fields to remove… and the buttons to look at different sections don’t work. I think i will try to restore back to 3.6.6 in my Cpanel backups!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Can't remove required State / Country field’ is closed to new replies.