WC_Product_Variation_Data_Store_CPT::generate_attribute_summary()protectedWC 3.6.0

Generates attribute summary for the variation.

Attribute summary contains comma-delimited 'attribute_name: attribute_value' pairs for all attributes.

Method of the class: WC_Product_Variation_Data_Store_CPT{}

No Hooks.

Return

String.

Usage

// protected - for code of main (parent) or child class
$result = $this->generate_attribute_summary( $product );
$product(WC_Product_Variation) (required)
Product variation to generate the attribute summary for.

Changelog

Since 3.6.0 Introduced.

WC_Product_Variation_Data_Store_CPT::generate_attribute_summary() code WC 8.6.1

protected function generate_attribute_summary( $product ) {
	return wc_get_formatted_variation( $product, true, true );
}