WordPress.org

Making WordPress.org

Changeset 999


Ignore:
Timestamp:
11/20/2014 04:47:09 AM (7 years ago)
Author:
iandunn
Message:

WordCamp Payments Dashboard: Exclude trashed posts from reports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/wordcamp-payments-network.php

    r997 r999  
    8888        global $wpdb;
    8989
     90        // Register the custom payment statuses so that we can filter posts to include only them, in order to exclude trashed posts
     91        require_once( WP_PLUGIN_DIR . '/wordcamp-payments/classes/payment-request.php' );
     92        WCP_Payment_Request::register_post_statuses();
     93
    9094        // Truncate existing table.
    9195        $wpdb->query( sprintf( "TRUNCATE TABLE %s;", self::get_table_name() ) );
     
    104108            while ( $requests = get_posts( array(
    105109                'paged' => $paged++,
    106                 'post_status' => 'any',
     110                'post_status' => array( 'paid', 'unpaid' ),
    107111                'post_type' => 'wcp_payment_request',
    108112                'posts_per_page' => 20,
Note: See TracChangeset for help on using the changeset viewer.