/** * Outputs a list of product attributes for a product. * @since 2.7.0 * @param WC_Product $product */ function wc_display_product_attributes($product) { wc_get_template('single-product/product-attributes.php', array('product' => $product, 'attributes' => array_filter($product->get_attributes(), 'wc_attributes_array_filter_visible'), 'display_dimensions' => apply_filters('wc_product_enable_dimensions_display', $product->has_weight() || $product->has_dimensions()))); }
/** * Returns whether or not the product has weight set. * * @return bool */ public function has_weight() { return parent::has_weight() || $this->child_has_weight(); }