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.

Method of the class: WC_Product_Variation{}

No Hooks.

Return

true|false.

Usage

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

WC_Product_Variation::has_attributes() code WC 9.4.2

public function has_attributes() {
	return false;
}