Skip to content
Docs
Get RestroPress

Action

rpress_parse_customer_query

Updated
On this page

Fires after the customer query vars have been parsed.

Fires at the end of RPRESS_Customer_Query::parse_query(), once the query vars and meta query clauses are set up. Callbacks can inspect or modify the query object before the database is queried.

Available since RestroPress 1.0.0.

Parameters#

ParameterTypeDescription
$queryRPRESS_Customer_QueryThe query instance, passed by reference.

Example#

function my_parse_customer_query( $query ) {
	if ( empty( $query->query_vars['number'] ) ) {
		$query->query_vars['number'] = 50;
	}
}
add_action( 'rpress_parse_customer_query', 'my_parse_customer_query' );

Notes#

Fired with do_action_ref_array(), so the callback receives the object that is modified in place.

Source#

Fired from:

  • includes/class-rpress-customer-query.php (line 267), in RPRESS_Customer_Query::parse_query()

See also#

Was this page helpful?