Skip to content

Commit

Permalink
refactor: add hook to allow adding query request clauses
Browse files Browse the repository at this point in the history
  • Loading branch information
David GABISON committed Aug 9, 2024
1 parent aed92b4 commit bd90641
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Donations/Endpoints/ListDonations.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,17 @@ protected function getWhereConditions(QueryBuilder $query): array
list($query, $dependencies) = $this->getDateWhereCondition($query, $dependencies);
list($query, $dependencies) = $this->getModeWhereCondition($query, $dependencies);

return [$query, $dependencies];
/**
* Allow adding request clauses
*
* @unreleased
* @param array $value {
* @type ModelQueryBuilder $query Donation query builder
* @type DonationMetaKeys[] $dependencies List of meta dependencies for added where clauses
* }
* @param ListDonations $endpoint API Endpoint instance
*/
return apply_filters('give_list-donation_where_conditions', [$query, $dependencies], $this);
}

private function getSearchWhereCondition (QueryBuilder $query, array $dependencies)
Expand Down

0 comments on commit bd90641

Please sign in to comment.