WordPress at Your Fingertips
function is not described

WC_Data::set_defaults() public WC 3.0.0

Set all props to default values.

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

No Hooks.

Return

null. Nothing.

Usage

$WC_Data = new WC_Data();
$WC_Data->set_defaults();

Changelog

Since 3.0.0 Introduced.

Code of WC_Data::set_defaults() WC 5.8.0

public function set_defaults() {
	$this->data    = $this->default_data;
	$this->changes = array();
	$this->set_object_read( false );
}