Automattic\WooCommerce\Admin\RemoteInboxNotifications

RemoteInboxNotificationsEngine::run()public staticWC 1.0

Go through the specs and run them.

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

Хуков нет.

Возвращает

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

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

$result = RemoteInboxNotificationsEngine::run();

Код RemoteInboxNotificationsEngine::run() WC 8.7.0

public static function run() {
	$specs = DataSourcePoller::get_instance()->get_specs_from_data_sources();

	if ( false === $specs || ! is_countable( $specs ) || count( $specs ) === 0 ) {
		return;
	}

	$stored_state = self::get_stored_state();
	$errors       = array();

	foreach ( $specs as $spec ) {
		$error = SpecRunner::run_spec( $spec, $stored_state );
		if ( isset( $error ) ) {
			$errors[] = $error;
		}
	}

	if ( count( $errors ) > 0 ) {
		self::log_errors( $errors );
	}
}