woocommerce_admin_disabled

woocommerce_admin_disabled

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.7.1

apply_filters('woocommerce_admin_disabled') is found 5 times:

  • /includes/admin/class-wc-admin-assets.php line 635
    631
    632
    633
    634
    635
    636
    637
    638
    639
    640
    641
            )
        );
    }
     
    $admin_features_disabled = apply_filters( 'woocommerce_admin_disabled', false );
    if ( ! $admin_features_disabled ) {
        $analytics_reports = Analytics::get_report_pages();
        if ( is_array( $analytics_reports ) && count( $analytics_reports ) > 0 ) {
            $formatted_analytics_reports = array_map( function( $report ) {
                if ( ! is_array( $report ) ) {
                    return null;
  • /includes/admin/class-wc-admin-dashboard.php line 142
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    wp_enqueue_script( 'wc-status-widget', WC()->plugin_url() . '/assets/js/admin/wc-status-widget' . $suffix . '.js', array( 'jquery', 'flot' ), $version, true );
     
    //phpcs:ignore
    $is_wc_admin_disabled = apply_filters( 'woocommerce_admin_disabled', false ) || ! Features::is_enabled( 'analytics' );
     
    $status_widget_reports = array(
        'net_sales_link'      => 'admin.php?page=wc-admin&path=%2Fanalytics%2Frevenue&chart=net_revenue&orderby=net_revenue&period=month&compare=previous_period',
        'top_seller_link'     => 'admin.php?page=wc-admin&filter=single_product&path=%2Fanalytics%2Fproducts&products=',
        'lowstock_link'       => 'admin.php?page=wc-admin&type=lowstock&path=%2Fanalytics%2Fstock',
        'outofstock_link'     => 'admin.php?page=wc-admin&type=outofstock&path=%2Fanalytics%2Fstock',
  • /includes/class-wc-tracker.php line 219
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    * Filter whether to disable admin tracking.
     *
     * @since 5.2.0
     */
    $data['wc_admin_disabled'] = apply_filters( 'woocommerce_admin_disabled', false ) ? 'yes' : 'no';
     
    // Mobile info.
    $data['wc_mobile_usage'] = self::get_woocommerce_mobile_usage();
     
    // WC Tracker data.
    $data['woocommerce_allow_tracking']               = get_option( 'woocommerce_allow_tracking', 'no' );
  • /src/Admin/Features/Features.php line 166
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    * Filter allowing WooCommerce Admin optional features to be disabled.
     *
     * @param bool $disabled False.
     */
    if ( apply_filters( 'woocommerce_admin_disabled', false ) ) {
        return array_values( array_diff( $features, $optional_feature_keys ) );
    }
     
    foreach ( $optional_feature_keys as $optional_feature_key ) {
        $feature_class = self::get_feature_class( $optional_feature_key );
  • /src/Internal/Features/FeaturesController.php line 897
    893
    894
    895
    896
    897
    898
    899
    900
    901
    902
    903
    * Filter allowing WooCommerce Admin to be disabled.
     *
     * @param bool $disabled False.
     */
    $admin_features_disabled = apply_filters( 'woocommerce_admin_disabled', false );
    // phpcs:enable WooCommerce.Commenting.CommentHooks.MissingSinceComment
     
    if ( ( 'analytics' === $feature_id || 'new_navigation' === $feature_id ) && $admin_features_disabled ) {
        $disabled = true;
        $desc_tip = __( 'WooCommerce Admin has been disabled', 'woocommerce' );
    } elseif ( 'new_navigation' === $feature_id ) {