Automattic\WooCommerce\Blocks\Patterns

PTKPatternsStore::get_patterns()publicWC 1.0

Get the patterns from the Patterns Toolkit cache.

Метод класса: PTKPatternsStore{}

Хуков нет.

Возвращает

Массив.

Использование

$PTKPatternsStore = new PTKPatternsStore();
$PTKPatternsStore->get_patterns();

Код PTKPatternsStore::get_patterns() WC 9.3.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;
}