Automattic\WooCommerce\Blocks\Patterns
PTKPatternsStore::get_patterns
Get the patterns from the Patterns Toolkit cache.
Method of the class: PTKPatternsStore{}
No Hooks.
Returns
Array
.
Usage
$PTKPatternsStore = new PTKPatternsStore(); $PTKPatternsStore->get_patterns();
PTKPatternsStore::get_patterns() PTKPatternsStore::get patterns code WC 9.9.3
public function get_patterns() { $patterns = get_transient( self::TRANSIENT_NAME ); // Only if the transient is not set, we schedule fetching the patterns from the PTK. if ( false === $patterns ) { $this->schedule_fetch_patterns(); return array(); } return $patterns; }