woocommerce_admin_disabled

woocommerce_admin_disabled

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

See hook in core

Displaying hooks found in version: woocommerce.9.9.5

apply_filters('woocommerce_admin_disabled') is found 5 times:

  • /includes/admin/class-wc-admin-assets.php line 650
    					)
    				);
    			}
    
    			$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 164
    		 * This contains the original content of the status_widget() method.
    		 */
    		public function status_widget_content() {
    			//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 221
    		 * 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 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 1074
    		 * 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 ) {