woocommerce_admin_disabled

woocommerce_admin_disabled

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

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_admin_disabled') is found 5 times:

  • /includes/admin/class-wc-admin-assets.php line 626
    					)
    				);
    			}
    
    			$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 132
     
    			include_once dirname( __FILE__ ) . '/reports/class-wc-admin-report.php';
    
    			//phpcs:ignore
    			$is_wc_admin_disabled = apply_filters( 'woocommerce_admin_disabled', false ) || ! Features::is_enabled( 'analytics' );
    
    			$reports = new WC_Admin_Report();
    
    			$net_sales_link  = 'admin.php?page=wc-reports&tab=orders&range=month';
    			$top_seller_link = 'admin.php?page=wc-reports&tab=orders&report=sales_by_product&range=month&product_ids=';
    			$report_data     = $is_wc_admin_disabled ? $this->get_sales_report_data() : $this->get_wc_admin_performance_data();
    
  • /includes/class-wc-tracker.php line 205
    		 * 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();
    
    		/**
    		 * Filter the data that's sent with the tracker.
    
  • /src/Admin/Features/Features.php line 158
    		 * 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 749
    		 * 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 ) {