Automattic\WooCommerce\Blocks\Patterns
PTKPatternsStore::flush_or_fetch_patterns
Resets the cached patterns when the woocommerce_allow_tracking option is disabled. Resets and fetch the patterns from the PTK when it is enabled (if the scheduler is initialized, it's done asynchronously via a scheduled action).
Метод класса: PTKPatternsStore{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$PTKPatternsStore = new PTKPatternsStore(); $PTKPatternsStore->flush_or_fetch_patterns();
Код PTKPatternsStore::flush_or_fetch_patterns() PTKPatternsStore::flush or fetch patterns WC 10.4.2
public function flush_or_fetch_patterns() {
if ( $this->allowed_tracking_is_enabled() ) {
$this->schedule_fetch_patterns();
return;
}
$this->flush_cached_patterns();
}