WC_Product_Variable::get_variation_attributes()publicWC 1.0

Return an array of attributes used for variations, as well as their possible values.

This is lazy loaded as it's not used often and does require several queries.

Method of the class: WC_Product_Variable{}

No Hooks.

Return

Array. Attributes and their available values

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_variation_attributes();

WC_Product_Variable::get_variation_attributes() code WC 9.4.2

public function get_variation_attributes() {
	if ( null === $this->variation_attributes ) {
		$this->variation_attributes = $this->data_store->read_variation_attributes( $this );
	}
	return $this->variation_attributes;
}