woocommerce_admin_is_loading
Some routes or features like onboarding hide the wp-admin navigation and masterbar. Setting woocommerce_admin_is_loading true allows us to premeptively hide these elements while the JS app loads. This class needs to be removed by those feature components (like <ProfileWizard />).
Usage
add_filter( 'woocommerce_admin_is_loading', 'wp_kama_woocommerce_admin_is_loading_filter' ); /** * Function for `woocommerce_admin_is_loading` filter-hook. * * @param bool $is_loading If WooCommerce Admin is loading a fullscreen view. * * @return bool */ function wp_kama_woocommerce_admin_is_loading_filter( $is_loading ){ // filter... return $is_loading; }
- $is_loading(true|false)
- If WooCommerce Admin is loading a fullscreen view.
Changelog
Since 6.5.0 | Introduced. |
Where the hook is called
woocommerce_admin_is_loading
woocommerce/src/Internal/Admin/Loader.php 178
$is_loading = apply_filters( 'woocommerce_admin_is_loading', false );