fix(user-center): close creator income review gaps
This commit is contained in:
1 parent
c16add0807
commit
cfb0a1368c
6 files changed
+56
-62
No files matched your search
@@ -396,6 +396,15 @@ class Revenue {
|
||||
$where[] = 'currency = %s';
|
||||
$params[] = $currency;
|
||||
}
|
||||
$order_status = sanitize_key((string) ($args['order_status'] ?? ''));
|
||||
$valid_order_statuses = class_exists('\\AKSRT\\Core\\DomainModel')
|
||||
? \AKSRT\Core\DomainModel::order_status_labels()
|
||||
: [];
|
||||
$orders_table = \AKSRT\Core\DBMigrator::table('order');
|
||||
if ($orders_table !== '' && isset($valid_order_statuses[$order_status])) {
|
||||
$where[] = "EXISTS (SELECT 1 FROM {$orders_table} AS income_order WHERE income_order.order_number = {$this->table()}.order_number AND income_order.status = %s)";
|
||||
$params[] = $order_status;
|
||||
}
|
||||
$order_number = sanitize_text_field((string) ($args['order_number'] ?? ''));
|
||||
if ($order_number !== '') {
|
||||
$where[] = 'order_number LIKE %s';
|
||||
|
||||
Reference in new issue
Block a user