Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions

PaymentGatewaySuggestionsDataSourcePoller::get_instance()public staticWC 1.0

Get class instance.

Method of the class: PaymentGatewaySuggestionsDataSourcePoller{}

No Hooks.

Return

null. Nothing (null).

Usage

$result = PaymentGatewaySuggestionsDataSourcePoller::get_instance();

PaymentGatewaySuggestionsDataSourcePoller::get_instance() code WC 9.0.1

public static function get_instance() {
	if ( ! self::$instance ) {
		// Add country query param to data sources.
		$base_location = wc_get_base_location();
		$data_sources  = array_map(
			function( $url ) use ( $base_location ) {
				return add_query_arg(
					'country',
					$base_location['country'],
					$url
				);
			},
			self::DATA_SOURCES
		);

		self::$instance = new self( self::ID, $data_sources );
	}
	return self::$instance;
}