WC_Product_Variation::has_attributes()publicWC 1.0

Returns whether or not the product has any visible attributes.

Variations are mapped to specific attributes unlike products, and the return value of ->get_attributes differs. Therefore this returns false.

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

Хуков нет.

Возвращает

true|false.

Использование

$WC_Product_Variation = new WC_Product_Variation();
$WC_Product_Variation->has_attributes();

Код WC_Product_Variation::has_attributes() WC 6.4.1

public function has_attributes() {
	return false;
}