WordPress at a glance
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. Nothing.

Usage

wc_get_var( $var, $default );
$var(mixed) (required)
Variable.
$default(string)
Default value.

Changelog

Since 3.2.0 Introduced.

Code of wc_get_var() WC 5.3.0

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