WordPress at Your Fingertips
function is not described

WC_Product_Variable::get_variation_default_attribute() public WC 1.0

If set, get the default attributes for a variable product.

{} It's a method of the class: WC_Product_Variable{}

No Hooks.

Return

String.

Usage

$WC_Product_Variable = new WC_Product_Variable();
$WC_Product_Variable->get_variation_default_attribute( $attribute_name );
$attribute_name(string) (required)
Attribute name.

Code of WC_Product_Variable::get_variation_default_attribute() WC 5.8.0

public function get_variation_default_attribute( $attribute_name ) {
	$defaults       = $this->get_default_attributes();
	$attribute_name = sanitize_title( $attribute_name );

	return isset( $defaults[ $attribute_name ] ) ? $defaults[ $attribute_name ] : '';
}