Automattic\WooCommerce\Blocks\Assets
AssetDataRegistry::get_store_pages
Get store pages to include in settings.
Метод класса: AssetDataRegistry{}
Хуков нет.
Возвращает
Массив.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->get_store_pages();
Код AssetDataRegistry::get_store_pages() AssetDataRegistry::get store pages WC 10.5.0
protected function get_store_pages() {
$store_pages = [
'myaccount' => wc_get_page_id( 'myaccount' ),
'shop' => wc_get_page_id( 'shop' ),
'cart' => wc_get_page_id( 'cart' ),
'checkout' => wc_get_page_id( 'checkout' ),
'privacy' => wc_privacy_policy_page_id(),
'terms' => wc_terms_and_conditions_page_id(),
];
if ( is_callable( '_prime_post_caches' ) ) {
_prime_post_caches( array_values( $store_pages ), false, false );
}
return array_map(
[ $this, 'format_page_resource' ],
$store_pages
);
}