wc_display_product_attributes

Outputs a list of product attributes for a product.

Description

wc_display_product_attributes( (WC_Product) $product ); 

Parameters (1)

0. $product (WC_Product)
The product.

Usage

  1. if ( !function_exists( 'wc_display_product_attributes' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-template-functions.php'; 
  3.  
  4. // The product. 
  5. $product = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_display_product_attributes($product); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-template-functions.php  
  1. function wc_display_product_attributes( $product ) { 
  2. wc_get_template( 'single-product/product-attributes.php', array( 
  3. 'product' => $product,  
  4. 'attributes' => array_filter( $product->get_attributes(), 'wc_attributes_array_filter_visible' ),  
  5. 'display_dimensions' => apply_filters( 'wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions() ),  
  6. ) );