woocommerce_admin_disabled
Filter allowing WooCommerce Admin optional features to be disabled.
Использование
add_filter( 'woocommerce_admin_disabled', 'wp_kama_woocommerce_admin_disabled_filter' ); /** * Function for `woocommerce_admin_disabled` filter-hook. * * @param bool $disabled False. * * @return bool */ function wp_kama_woocommerce_admin_disabled_filter( $disabled ){ // filter... return $disabled; }
- $disabled(true|false)
- False.
Где вызывается хук
woocommerce_admin_disabled
woocommerce_admin_disabled
woocommerce_admin_disabled
woocommerce/src/Admin/Features/Features.php 157
if ( apply_filters( 'woocommerce_admin_disabled', false ) ) {
woocommerce/src/Internal/Features/FeaturesController.php 808
$admin_features_disabled = apply_filters( 'woocommerce_admin_disabled', false );
woocommerce/includes/admin/class-wc-admin-assets.php 627
$admin_features_disabled = apply_filters( 'woocommerce_admin_disabled', false );
woocommerce/includes/admin/class-wc-admin-dashboard.php 159
$is_wc_admin_disabled = apply_filters( 'woocommerce_admin_disabled', false ) || ! Features::is_enabled( 'analytics' );
woocommerce/includes/class-wc-tracker.php 214
$data['wc_admin_disabled'] = apply_filters( 'woocommerce_admin_disabled', false ) ? 'yes' : 'no';