Automattic\WooCommerce\Internal\Admin
Events::possibly_refresh_data_source_pollers
Prime or fetch specs for the following DataSourcePollers on the wc_admin_daily cron job when their related transients are missing or expired:
- PaymentGatewaySuggestionsDataSourcePoller
- RemoteFreeExtensionsDataSourcePoller
Метод класса: Events{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->possibly_refresh_data_source_pollers();
Код Events::possibly_refresh_data_source_pollers() Events::possibly refresh data source pollers WC 11.2.2
protected function possibly_refresh_data_source_pollers() {
$completed_tasks = get_option( 'woocommerce_task_list_tracked_completed_tasks', array() );
if ( ! in_array( 'payments', $completed_tasks, true ) && ! in_array( 'woocommerce-payments', $completed_tasks, true ) ) {
PaymentGatewaySuggestionsDataSourcePoller::get_instance()->get_specs_from_data_sources();
}
if ( ! in_array( 'store_details', $completed_tasks, true ) && ! in_array( 'marketing', $completed_tasks, true ) ) {
RemoteFreeExtensionsDataSourcePoller::get_instance()->get_specs_from_data_sources();
}
}