WC_Product::set_default_attributes( array $default_attributes )

Set default attributes. These will be saved as strings and should map to attribute values.

Description Description

Parameters Parameters


(Required) List of default attributes.

Top ↑

Source Source

File: includes/abstracts/abstract-wc-product.php

	public function set_default_attributes( $default_attributes ) {
		$this->set_prop( 'default_attributes', array_map( 'strval', array_filter( (array) $default_attributes, 'wc_array_filter_default_attributes' ) ) );

Top ↑

Changelog Changelog

Version Description
3.0.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.