Skip to content
Docs
Get RestroPress

Action

rpress_pre_get_customers

Updated
On this page

Fires before customers are retrieved.

Fires in RPRESS_Customer_Query::get_items() before the cache key is computed and the customer rows are fetched. The query object is passed by reference so its query vars can still be changed.

Available since RestroPress 1.0.0.

Parameters#

ParameterTypeDescription
$queryRPRESS_Customer_QueryThe query instance, passed by reference.

Example#

function my_pre_get_customers( $query ) {
	$query->query_vars['order'] = 'ASC';
}
add_action( 'rpress_pre_get_customers', 'my_pre_get_customers' );

Source#

Fired from:

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

See also#

Was this page helpful?