Update # of orders filter for orders with coupon
MAILPOET-5373
This commit is contained in:
committed by
Aschepikov
parent
09a5a5cbbc
commit
dda7da465f
@ -78,6 +78,12 @@ class WooCommerceNumberOfOrders implements Filter {
|
||||
$joinCondition
|
||||
);
|
||||
|
||||
$action = $filterData->getAction();
|
||||
|
||||
if ($action === self::ACTION_NUMBER_OF_ORDERS_WITH_COUPON) {
|
||||
$subQuery->innerJoin('orderStats', $wpdb->prefix . 'wc_order_coupon_lookup', 'couponLookup', 'orderStats.order_id = couponLookup.order_id');
|
||||
}
|
||||
|
||||
$queryBuilder->add('join', [
|
||||
$subscribersTable => [
|
||||
/**
|
||||
|
Reference in New Issue
Block a user