woocommerce_admin_disabled

woocommerce_admin_disabled

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

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_admin_disabled') is found 5 times:

  • /includes/admin/class-wc-admin-assets.php line 627
    					)
    				);
    			}
    
    			$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 140
     
    			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
    		 * 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 154
    		 * 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 842
    		 * 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 ) {