Your account expired support, please renew to get your support.

Home Forums Themes Support Gecko How to hide state field in account setup for alternative delivery address

Viewing 1 reply thread
  • Author
    Posts
    • #39088
      walteratx5nu
      Support Expired

      I want to remove the state field in the personal account when editing billing or delivery address .

      I tried with additional CSS like #shipping_state_field {display:none;}

      But this does not work, as display:block is hard coded into the page object.

      How can I get rid of this field that is never used in Europe.

      The problem exists on this page:

      …my-account/edit-address/shipping/

      Thanks

    • #39091
      Harry
      Support Expired

      Hi Walter,

      Please add below code to gecko-child > functions.php

      function jeherve_remove_state_field( $fields ) {
      	unset( $fields['state'] );
      
      	return $fields;
      }
      add_filter( 'woocommerce_default_address_fields', 'jeherve_remove_state_field' );

      Kind regards

      Harry
      Premium Wordpress themes and plugins, Best WooCommerce theme https://themeforest.net/user/janstudio/portfolio?ref=janstudio

Viewing 1 reply thread

You must be logged in to reply to this topic.