woocommerce_store_pages
Filter the store pages array to check if a URL is a store page.
Использование
add_filter( 'woocommerce_store_pages', 'wp_kama_woocommerce_store_pages_filter' ); /** * Function for `woocommerce_store_pages` filter-hook. * * @param array $store_pages The store pages array. The keys are the page slugs and the values are the page IDs. * * @return array */ function wp_kama_woocommerce_store_pages_filter( $store_pages ){ // filter... return $store_pages; }
- $store_pages(массив)
- The store pages array. The keys are the page slugs and the values are the page IDs.
Список изменений
С версии 8.8.0 | Введена. |
Где вызывается хук
woocommerce_store_pages
woocommerce/src/Admin/WCAdminHelper.php 182
$store_pages = apply_filters( 'woocommerce_store_pages', $store_pages );