Title: Feature request: hide empty values
Last modified: February 26, 2024

---

# Feature request: hide empty values

 *  [Thomas Nielsen](https://wordpress.org/support/users/thniels/)
 * (@thniels)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/feature-request-hide-empty-values/)
 * Might you be persuaded to add a tiny check to your nice little plugin?
   In the
   method WPCAG_Fo::attributes_table all attributes are listed regardless if they
   have a value or not.I added a rudimentary check…
 *     ```wp-block-code
       	public static function attributes_table( $product_attributes ) {
       		ob_start();
       		?>
               <table class="woocommerce-product-attributes shop_attributes">
       			<?php foreach ( $product_attributes as $product_attribute_key => $product_attribute ) { 
       				if ( $product_attribute['value'] ) {
       				?>
                       <tr class="woocommerce-product-attributes-item woocommerce-product-attributes-item--<?php echo esc_attr( $product_attribute_key ); ?>">
                           <th class="woocommerce-product-attributes-item__label"><?php echo wp_kses_post( $product_attribute['label'] ); ?></th>
                           <td class="woocommerce-product-attributes-item__value"><?php echo wp_kses_post( $product_attribute['value'] ); ?></td>
                       </tr>
       			<?php } } ?>
               </table>
       		<?php
       		return apply_filters( 'wpcag_attributes_table', ob_get_clean(), $product_attributes );
       	}
       ```
   
 * …but seeing that I can’t extend the class and override it, it’s a bit on the 
   volatile side. The real solution would of course be to add an option for this
   in the plugin itself.

Viewing 1 replies (of 1 total)

 *  [Janilyn T](https://wordpress.org/support/users/janilyn409/)
 * (@janilyn409)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/feature-request-hide-empty-values/#post-17477754)
 * Hi Thomas,
 * Thanks for the request. I have sent it over to our developers so that they can
   consider it in the next update. Please check back when there is a new update 
   for this plugin.
 * Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Feature request: hide empty values’ is closed to new replies.

 * ![](https://ps.w.org/wpc-attribute-groups/assets/icon-128x128.png?rev=2966792)
 * [WPC Smart Attribute Groups for WooCommerce](https://wordpress.org/plugins/wpc-attribute-groups/)
 * [Support Threads](https://wordpress.org/support/plugin/wpc-attribute-groups/)
 * [Active Topics](https://wordpress.org/support/plugin/wpc-attribute-groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpc-attribute-groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpc-attribute-groups/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Janilyn T](https://wordpress.org/support/users/janilyn409/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/feature-request-hide-empty-values/#post-17477754)
 * Status: not a support question