Automattic\WooCommerce\Blocks\Patterns
PTKPatternsStore::flush_or_fetch_patterns
Resets the cached patterns when tracking is disabled and cancels old fetch jobs otherwise.
Method of the class: PTKPatternsStore{}
No Hooks.
Returns
void. Nothing (null).
Usage
$PTKPatternsStore = new PTKPatternsStore(); $PTKPatternsStore->flush_or_fetch_patterns();
PTKPatternsStore::flush_or_fetch_patterns() PTKPatternsStore::flush or fetch patterns code WC 11.3.0
public function flush_or_fetch_patterns() {
if ( $this->allowed_tracking_is_enabled() ) {
$this->cancel_fetch_patterns_when_ready();
return;
}
$this->flush_cached_patterns();
}