woocommerce_navigation_is_connected_page
Whether or not the current page is an existing page connected to this controller.
Used to determine if the WooCommerce Admin header should be rendered.
Использование
add_filter( 'woocommerce_navigation_is_connected_page', 'wp_kama_woocommerce_navigation_is_connected_page_filter', 10, 2 ); /** * Function for `woocommerce_navigation_is_connected_page` filter-hook. * * @param boolean $is_connected_page True if the current page is connected. * @param array|boolean $current_page The connected page data or false if not identified. * * @return boolean */ function wp_kama_woocommerce_navigation_is_connected_page_filter( $is_connected_page, $current_page ){ // filter... return $is_connected_page; }
- $is_connected_page(true|false)
- True if the current page is connected.
- $current_page(массив|true|false)
- The connected page data or false if not identified.
Где вызывается хук
woocommerce_navigation_is_connected_page
woocommerce/src/Admin/PageController.php 393
return apply_filters( 'woocommerce_navigation_is_connected_page', $is_connected_page, $current_page );
Где используется хук в WooCommerce
woocommerce/includes/react-admin/connect-existing-pages.php 125
add_filter( 'woocommerce_navigation_is_connected_page', 'wc_admin_connect_core_pages', 10, 2 );