WC_Countries::estimated_for_prefix( string $country_code = '' )

Prefix certain countries with ‘the’.


Description Description


Parameters Parameters

$country_code

(Optional) Country code.

Default value: ''


Top ↑

Return Return

(string)


Top ↑

Source Source

File: includes/class-wc-countries.php

	public function estimated_for_prefix( $country_code = '' ) {
		$country_code = $country_code ? $country_code : $this->get_base_country();
		$countries    = array( 'GB', 'US', 'AE', 'CZ', 'DO', 'NL', 'PH', 'USAF' );
		$return       = in_array( $country_code, $countries, true ) ? __( 'the', 'woocommerce' ) . ' ' : '';

		return apply_filters( 'woocommerce_countries_estimated_for_prefix', $return, $country_code );
	}


Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.