Automattic\WooCommerce\Admin\Features\PaymentGatewaySuggestions

PaymentGatewaySuggestionsDataSourcePoller::get_instance()public staticWC 1.0

Get class instance.

Метод класса: PaymentGatewaySuggestionsDataSourcePoller{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$result = PaymentGatewaySuggestionsDataSourcePoller::get_instance();

Код PaymentGatewaySuggestionsDataSourcePoller::get_instance() WC 8.9.0

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;
}