| @@ -356,9 +356,22 @@ | ||
| 356 | 356 | 'order' => strtoupper( $order ), |
| 357 | 357 | ]; |
| 358 | 358 | |
| 359 | 359 | // Add status filter. |
| 360 | - if ( 'all' !== $status ) { | |
| 360 | + if ( 'paused' === $status ) { | |
| 361 | + // "Paused" is a campaign business status stored inside the campaign | |
| 362 | + // meta JSON (not a WP post status), so match published campaigns whose | |
| 363 | + // meta marks them paused. | |
| 364 | + $args['post_status'] = 'publish'; | |
| 365 | + // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_query -- Admin-only campaign list filter. | |
| 366 | + $args['meta_query'] = [ | |
| 367 | + [ | |
| 368 | + 'key' => Helper::SUREDONATION_CAMPAIGN_META_KEY, | |
| 369 | + 'value' => '"campaign_status":"paused"', | |
| 370 | + 'compare' => 'LIKE', | |
| 371 | + ], | |
| 372 | + ]; | |
| 373 | + } elseif ( 'all' !== $status ) { | |
| 361 | 374 | $args['post_status'] = $status; |
| 362 | 375 | } else { |
| 363 | 376 | $args['post_status'] = [ 'publish', 'draft' ]; |
| 364 | 377 | } |