woocommerce_navigation_current_screen_id filter-hookWC 3.9.0

Filter the current screen ID for REST API requests.

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      $current_screen The current WP_Screen.
 *
 * @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)
The current WP_Screen.

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 269
return apply_filters( 'woocommerce_navigation_current_screen_id', false, null );
woocommerce/src/Admin/PageController.php 275
return apply_filters( 'woocommerce_navigation_current_screen_id', false, $current_screen );
woocommerce/src/Admin/PageController.php 371
return apply_filters( 'woocommerce_navigation_current_screen_id', implode( '-', $screen_pieces ), $current_screen );

Where the hook is used in WooCommerce

Usage not found.