WordPress at a glance
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{}

No Hooks.


true|false. Whether any specs were read.


$result = DataSourcePoller::read_specs_from_data_sources();

Code of DataSourcePoller::read_specs_from_data_sources() WC 5.2.2

public static function read_specs_from_data_sources() {
	$specs = array();

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

	// Persist the specs as an option.
	update_option( RemoteInboxNotificationsEngine::SPECS_OPTION_NAME, $specs );

	return 0 !== count( $specs );