WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin

DataSourcePoller::__construct() public WC 1.0

Constructor.

{} It's a method of the class: DataSourcePoller{}

No Hooks.

Return

null. Nothing.

Usage

$DataSourcePoller = new DataSourcePoller();
$DataSourcePoller->__construct( $id, $data_sources, $args );
$id(string) (required)
id of DataSourcePoller.
$data_sources(array)
urls for data sources.
Default: array()
$args(array)
Options for DataSourcePoller.
Default: array()

Code of DataSourcePoller::__construct() WC 6.1.1

public function __construct( $id, $data_sources = array(), $args = array() ) {
	$this->data_sources = $data_sources;
	$this->id           = $id;

	$arg_defaults = array(
		'spec_key'         => 'id',
		'transient_name'   => 'woocommerce_admin_' . $id . '_specs',
		'transient_expiry' => 7 * DAY_IN_SECONDS,
	);
	$this->args   = wp_parse_args( $args, $arg_defaults );
}