WordPress at Your Fingertips
function is not described

WC_Object_Query::get() public WC 1.0

Get the value of a query variable.

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

No Hooks.


Mixed. Query variable value if set, otherwise default.


$WC_Object_Query = new WC_Object_Query();
$WC_Object_Query->get( $query_var, $default );
$query_var(string) (required)
Query variable to get value for.
Default value if query variable is not set.

Code of WC_Object_Query::get() WC 5.5.2

public function get( $query_var, $default = '' ) {
	if ( isset( $this->query_vars[ $query_var ] ) ) {
		return $this->query_vars[ $query_var ];
	return $default;