woocommerce_navigation_current_screen_id │ filter-hook │ WC 3.9.0

The current screen id.

Used for identifying pages to render the WooCommerce Admin header.

Usage

add_filter( 'woocommerce_navigation_current_screen_id', 'wp_kama_woocommerce_navigation_current_screen_id_filter', 10, 2 );

/**
 * Function for `woocommerce_navigation_current_screen_id` filter-hook.
 * 
 * @param string|boolean  $screen_id      The screen id or false if not identified.
 * @param \WP_Screen|null $current_screen The current WP_Screen or null if it could not be determined.
 *
 * @return string|boolean
 */
function wp_kama_woocommerce_navigation_current_screen_id_filter( $screen_id, $current_screen ){
	// filter...
	return $screen_id;
}
$screen_id(string|true|false)
The screen id or false if not identified.
$current_screen(\WP_Screen|null)
The current WP_Screen or null if it could not be determined.

Changelog

Since 3.9.0 Introduced.

Where the hook is called

PageController::get_current_screen_id()
woocommerce_navigation_current_screen_id
woocommerce/src/Admin/PageController.php 364
return apply_filters( 'woocommerce_navigation_current_screen_id', implode( '-', $screen_pieces ), $current_screen );
woocommerce/src/Admin/PageController.php 267
return apply_filters( 'woocommerce_navigation_current_screen_id', false, $current_screen );

Where the hook is used in WooCommerce

Usage not found.