Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions inc/models/class-customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,12 @@ public function set_type($type) {
*/
public function get_total_grossed() {

$pre = apply_filters( 'wu_pre_customer_get_total_grossed', null, $this );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

static $sum;
Expand Down
6 changes: 6 additions & 0 deletions inc/models/class-domain.php
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,12 @@ public function delete() {
*/
public static function get_by_site($site) {

$pre = apply_filters( 'wu_pre_domain_get_by_site', null, $site );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

// Allow passing a site object in
Expand Down
6 changes: 6 additions & 0 deletions inc/models/class-membership.php
Original file line number Diff line number Diff line change
Expand Up @@ -2320,6 +2320,12 @@ public function set_recurring($recurring): void {
*/
public function get_total_grossed() {

$pre = apply_filters( 'wu_pre_membership_get_total_grossed', null, $this );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

static $sum;
Expand Down
18 changes: 18 additions & 0 deletions inc/models/class-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,12 @@ public function get_membership() {
return $this->membership;
}

$pre = apply_filters( 'wu_pre_site_get_membership', null, $this );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

$table_name = "{$wpdb->base_prefix}wu_memberships";
Expand Down Expand Up @@ -2226,6 +2232,12 @@ public function to_search_results() {
*/
public static function get_all_by_type($type = 'customer_owned', $query_args = []) {

$pre = apply_filters( 'wu_pre_site_get_all_by_type', null, $type, $query_args );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

if ('pending' === $type) {
Expand Down Expand Up @@ -2318,6 +2330,12 @@ public static function get_all_by_categories($categories = [], $query_args = [])
*/
public static function get_all_categories($sites = []) {

$pre = apply_filters( 'wu_pre_site_get_all_categories', null, $sites );

if ( null !== $pre ) {
return $pre;
}

global $wpdb;

$site_ids = [];
Expand Down
Loading