Created
June 23, 2023 10:46
-
-
Save ibrahim-kardi/707dca5a00574753fcec16b397cc8101 to your computer and use it in GitHub Desktop.
get woocommerce state under the country
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$valid_states = WC()->countries->get_states( $country ); | |
$for_country = isset( $args['country'] ) ? $args['country'] : WC()->checkout->get_value( 'billing_state' === $key ? 'billing_country' : 'shipping_country' ); | |
$states = WC()->countries->get_states( $for_country ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment