PluginProbe
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management / 1.1.0
SureDonation – Donation Forms, Fundraising Campaigns & Donor Management v1.1.0
1.6.1 1.6.0 1.5.1 1.5.0 1.4.0 1.3.0 trunk 0.0.1 1.0.0 1.1.0 1.1.1 1.1.2 1.2.0
← All changes | inc/api/campaigns-api.php +14 -1 1.0.0 → 1.1.0 View file →
@@ -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 }