Changeset 2617
- Timestamp:
- 02/25/2016 07:34:11 PM (9 years ago)
- Location:
- sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network
-
Property
svn:mergeinfo
set to
/sites/trunk/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network merged eligible
-
Property
svn:mergeinfo
set to
-
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/bootstrap.php
r2421 r2617 21 21 */ 22 22 require_once( WP_PLUGIN_DIR . '/wordcamp-payments/includes/wordcamp-budgets.php' ); 23 if ( defined( 'WPORG_PROXIED_REQUEST' ) && WPORG_PROXIED_REQUEST ) { 24 require_once( WP_PLUGIN_DIR . '/wordcamp-payments/includes/sponsor-invoice.php' ); 25 } 23 require_once( WP_PLUGIN_DIR . '/wordcamp-payments/includes/sponsor-invoice.php' ); 26 24 27 25 require_once( __DIR__ . '/includes/wordcamp-budgets-dashboard.php' ); 28 26 require_once( __DIR__ . '/includes/payment-requests-dashboard.php' ); 29 if ( defined( 'WPORG_PROXIED_REQUEST' ) && WPORG_PROXIED_REQUEST ) { 30 require_once( __DIR__ . '/includes/sponsor-invoices-dashboard.php' ); 31 } 27 require_once( __DIR__ . '/includes/sponsor-invoices-dashboard.php' ); 32 28 require_once( __DIR__ . '/includes/reimbursement-requests-dashboard.php' ); 33 29 -
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-dashboard.php
r2597 r2617 99 99 while ( $requests = get_posts( array( 100 100 'paged' => $paged++, 101 'post_status' => array( 'paid', 'unpaid', 'incomplete' ),101 'post_status' => 'any', 102 102 'post_type' => 'wcp_payment_request', 103 103 'posts_per_page' => 20, … … 140 140 if ( ! empty( $amount) ) { 141 141 $keywords[] = $amount; 142 } 143 144 $back_compat_statuses = array( 145 'unpaid' => 'draft', 146 'incomplete' => 'wcb-incomplete', 147 'paid' => 'wcb-paid', 148 ); 149 150 // Map old statuses to new statuses. 151 if ( array_key_exists( $request->post_status, $back_compat_statuses ) ) { 152 $request->post_status = $back_compat_statuses[ $request->post_status ]; 142 153 } 143 154 … … 1230 1241 $tab = 'overdue'; 1231 1242 $tabs = array( 1232 'pending',1233 1243 'overdue', 1244 1245 'pending-approval', 1246 'approved', 1247 'pending-payment', 1234 1248 'paid', 1249 'cancelled-failed', 1235 1250 'incomplete', 1251 1236 1252 'export', 1237 1253 'import', … … 1251 1267 $current_section = self::get_current_tab(); 1252 1268 $sections = array( 1253 'overdue' => 'Overdue', 1254 'pending' => 'Pending', 1255 'paid' => 'Paid', 1256 'incomplete' => __( 'Incomplete', 'wordcamporg' ), 1257 'export' => __( 'Export', 'wordcamporg' ), 1258 'import' => __( 'Import', 'wordcamporg' ), 1269 'overdue' => __( 'Overdue', 'wordcamporg' ), // pending-approval + after due date 1270 'pending-approval' => __( 'Pending Approval', 'wordcamporg' ), 1271 'approved' => __( 'Approved', 'wordcamporg' ), 1272 'pending-payment' => __( 'Pending Payment', 'wordcamporg' ), 1273 'paid' => __( 'Paid', 'wordcamporg' ), 1274 'cancelled-failed' => __( 'Cancelled/Failed', 'wordcamporg' ), 1275 'incomplete' => __( 'Incomplete', 'wordcamporg' ), 1276 'export' => __( 'Export', 'wordcamporg' ), 1277 'import' => __( 'Import', 'wordcamporg' ), 1259 1278 ); 1260 1279 -
sites/branches/wcb-payment-request-statuses/wordcamp.org/public_html/wp-content/plugins/wordcamp-payments-network/includes/payment-requests-list-table.php
r2538 r2617 77 77 78 78 if ( 'overdue' == $view ) { 79 $where .= $wpdb->prepare( " AND `status` = 'unpaid' AND `due` > 0 AND `due` <= %d ", time() ); 80 } elseif ( 'pending' == $view ) { 81 $where .= " AND `status` = 'unpaid' "; 79 $where .= $wpdb->prepare( " AND `status` = 'wcb-pending-approval' AND `due` > 0 AND `due` <= %d ", time() ); 80 } elseif ( 'pending-approval' == $view ) { 81 $where .= " AND `status` = 'wcb-pending-approval' "; 82 } elseif ( 'approved' == $view ) { 83 $where .= " AND `status` = 'wcb-approved' "; 84 } elseif ( 'pending-payment' == $view ) { 85 $where .= " AND `status` = 'wcb-pending-payment' "; 82 86 } elseif ( 'paid' == $view ) { 83 $where .= " AND `status` = ' paid' ";87 $where .= " AND `status` = 'wcb-paid' "; 84 88 $orderby = 'created'; 85 89 $order = 'desc'; 86 } elseif( 'incomplete' == $view ) { 87 $where .= " AND `status` = 'incomplete' "; 90 } elseif ( 'incomplete' == $view ) { 91 $where .= " AND `status` = 'wcb-incomplete' "; 92 } elseif ( 'cancelled-failed' == $view ) { 93 $where .= " AND `status` IN ( 'wcb-failed', 'wcb-cancelled' ) "; 88 94 } 89 95 … … 153 159 */ 154 160 public function column_status( $request ) { 155 return esc_html( ucwords( $request->post_status ) ); 161 $status = get_post_status_object( $request->post_status ); 162 return esc_html( $status->label ); 156 163 } 157 164
Note: See TracChangeset
for help on using the changeset viewer.