woocommerce_navigation_get_breadcrumbs хук-фильтрWC 1.0

The navigation breadcrumbs for the current page.

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

add_filter( 'woocommerce_navigation_get_breadcrumbs', 'wp_kama_woocommerce_navigation_get_breadcrumbs_filter', 10, 2 );

/**
 * Function for `woocommerce_navigation_get_breadcrumbs` filter-hook.
 * 
 * @param array         $breadcrumbs  Navigation pieces (breadcrumbs).
 * @param array|boolean $current_page The connected page data or false if not identified.
 *
 * @return array
 */
function wp_kama_woocommerce_navigation_get_breadcrumbs_filter( $breadcrumbs, $current_page ){

	// filter...
	return $breadcrumbs;
}
$breadcrumbs(массив)
Navigation pieces (breadcrumbs).
$current_page(массив|true|false)
The connected page data or false if not identified.

Где вызывается хук

PageController::get_breadcrumbs()
woocommerce_navigation_get_breadcrumbs
woocommerce/src/Admin/PageController.php 213
return apply_filters( 'woocommerce_navigation_get_breadcrumbs', $breadcrumbs, $current_page );
woocommerce/src/Admin/PageController.php 167
return apply_filters( 'woocommerce_navigation_get_breadcrumbs', array( '' ), $current_page );

Где используется хук в WooCommerce

woocommerce/includes/react-admin/connect-existing-pages.php 115
add_filter( 'woocommerce_navigation_get_breadcrumbs', 'wc_admin_filter_core_page_breadcrumbs' );