WordPress at Your Fingertips
function is not described


DataSourcePoller::read_specs_from_data_sources() public WC 1.0

Reads the data sources for specs and persists those specs.

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

Hooks from the method


true|false. Whether any specs were read.


$DataSourcePoller = new DataSourcePoller();

Code of DataSourcePoller::read_specs_from_data_sources() WC 6.1.0

public function read_specs_from_data_sources() {
	$specs        = array();
	$data_sources = apply_filters( self::FILTER_NAME, $this->data_sources, $this->id );

	// Note that this merges the specs from the data sources based on the
	// id - last one wins.
	foreach ( $data_sources as $url ) {
		$specs_from_data_source = self::read_data_source( $url );
		$this->merge_specs( $specs_from_data_source, $specs, $url );

	// Persist the specs as a transient.

	return 0 !== count( $specs );