File "MarketingRecommendationsDataSourcePoller.php"

Full Path: /home/jlklyejr/public_html/wp-content-20241030122153/plugins/woocommerce/src/Admin/Features/MarketingRecommendations/MarketingRecommendationsDataSourcePoller.php
File size: 879 bytes
MIME-type: text/x-php
Charset: utf-8

<?php

namespace Automattic\WooCommerce\Admin\Features\MarketingRecommendations;

use Automattic\WooCommerce\Admin\DataSourcePoller;

/**
 * Specs data source poller class for marketing recommendations.
 */
class MarketingRecommendationsDataSourcePoller extends DataSourcePoller {

	/**
	 * Data Source Poller ID.
	 */
	const ID = 'marketing_recommendations';

	/**
	 * Default data sources array.
	 */
	const DATA_SOURCES = array(
		'https://woocommerce.com/wp-json/wccom/marketing-tab/1.3/recommendations.json',
	);

	/**
	 * Class instance.
	 *
	 * @var Analytics instance
	 */
	protected static $instance = null;

	/**
	 * Get class instance.
	 */
	public static function get_instance() {
		if ( ! self::$instance ) {
			self::$instance = new self(
				self::ID,
				self::DATA_SOURCES,
				array(
					'spec_key' => 'product',
				)
			);
		}
		return self::$instance;
	}
}