get_store_allowed_countries(); if ( ! empty( $allowed_countries ) ) { foreach ($allowed_countries as $code => $country) { if (file_exists($this->plugin_path() . '/states/' . $code . '.php')) { include($this->plugin_path() . '/states/' . $code . '.php'); } } } return $states; } public function get_store_allowed_countries() { $allowed_countries = new WC_Countries(); return array_merge( $allowed_countries->get_allowed_countries(), $allowed_countries->get_shipping_countries() ); } public function plugin_path() { return untrailingslashit( plugin_dir_path( __FILE__ ) ); } } $WC_All_Country_Counties = new WC_All_Country_Counties( __FILE__ ); endif;