WordPress at Your Fingertips
function is not described

wc_get_var() WC 3.2.0

Get data if set, otherwise return a default value or null. Prevents notices when data is not set.

No Hooks.

Return

Mixed.

Usage

wc_get_var( $var, $default );
$var(mixed) (required) (passed by reference — &)
Variable.
$default(string)
Default value.
Default: null

Changelog

Since 3.2.0 Introduced.

Code of wc_get_var() WC 5.8.0

function wc_get_var( &$var, $default = null ) {
	return isset( $var ) ? $var : $default;
}