WordPress at Your Fingertips
function is not described

WC_Settings_API::set_defaults() protected WC 1.0

Set default required properties for each field.

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

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->set_defaults( $field );
$field(array) (required)
Setting field array.

Code of WC_Settings_API::set_defaults() WC 5.5.2

<?php
protected function set_defaults( $field ) {
	if ( ! isset( $field['default'] ) ) {
		$field['default'] = '';
	}
	return $field;
}