WordPress как на ладони
Недорогой хостинг для сайтов на WordPress: wordpress.jino.ru
функция не описана

WC_Product_Variation::get_variation_attributes() public WC 1.0

Get variation attribute values. Keys are prefixed with attribute_, as stored, unless $with_prefix is false.

{} Это метод класса: WC_Product_Variation{}

Хуков нет.


Массив. of attributes and their values for this variation.


$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->get_variation_attributes( $with_prefix );
Whether keys should be prepended with attribute_ or not.
По умолчанию: true

Код WC_Product_Variation::get_variation_attributes() WC 5.7.0

public function get_variation_attributes( $with_prefix = true ) {
	$attributes           = $this->get_attributes();
	$variation_attributes = array();
	$prefix               = $with_prefix ? 'attribute_' : '';

	foreach ( $attributes as $key => $value ) {
		$variation_attributes[ $prefix . $key ] = $value;
	return $variation_attributes;