Automattic\WooCommerce\Admin\RemoteInboxNotifications
RemoteInboxNotificationsEngine::run
Go through the specs and run them.
Method of the class: RemoteInboxNotificationsEngine{}
No Hooks.
Returns
null. Nothing (null).
Usage
$result = RemoteInboxNotificationsEngine::run();
RemoteInboxNotificationsEngine::run() RemoteInboxNotificationsEngine::run code WC 10.3.6
public static function run() {
$specs = RemoteInboxNotificationsDataSourcePoller::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 );
}
}