WC_Countries::get_base_country PHP Method

get_base_country() public method

Get the base country for the store.
public get_base_country ( ) : string
return string
    public function get_base_country()
    {
        $default = wc_get_base_location();
        return apply_filters('woocommerce_countries_base_country', $default['country']);
    }

Usage Example

示例#1
0
 public function admin_load_script($hook)
 {
     if ($hook !== 'woocommerce_page_wc-settings') {
         return;
     }
     wp_enqueue_script('edostavka-admin', plugins_url('/assets/js/admin.js', __FILE__), array('jquery'), self::VERSION, true);
     wp_localize_script('edostavka-admin', 'wc_params', array('default_country' => WC_Countries::get_base_country(), 'api_url' => $this->get_api_url()));
 }
All Usage Examples Of WC_Countries::get_base_country