WC_Countries::shipping_to_prefix PHP Метод

shipping_to_prefix() публичный Метод

Gets the correct string for shipping - either 'to the' or 'to'
public shipping_to_prefix ( $country_code = '' ) : string
Результат string
    public function shipping_to_prefix($country_code = '')
    {
        $country_code = $country_code ? $country_code : WC()->customer->get_shipping_country();
        $countries = array('GB', 'US', 'AE', 'CZ', 'DO', 'NL', 'PH', 'USAF');
        $return = in_array($country_code, $countries) ? __('to the', 'woocommerce') : __('to', 'woocommerce');
        return apply_filters('woocommerce_countries_shipping_to_prefix', $return, $country_code);
    }