Automattic\WooCommerce\Internal\Admin\Settings
Payments::get_country
Get the business location country code for the Payments settings.
Method of the class: Payments{}
No Hooks.
Returns
String
. The ISO 3166-1 alpha-2 country code to use for the overall business location. If the user didn't set a location, the WC base location country code is used.
Usage
$Payments = new Payments(); $Payments->get_country(): string;
Payments::get_country() Payments::get country code WC 9.9.4
public function get_country(): string { $user_nox_meta = get_user_meta( get_current_user_id(), self::PAYMENTS_NOX_PROFILE_KEY, true ); if ( ! empty( $user_nox_meta['business_country_code'] ) ) { return $user_nox_meta['business_country_code']; } return WC()->countries->get_base_country(); }