/**
  * Retrieve all the data for all the receipts
  *
  * @access public
  * @since 1.0
  * @return array $receipt_data Array of all the data for the receipt
  */
 public function receipt_data()
 {
     $receipt_data = array();
     $per_page = $this->per_page;
     $mode = edd_is_test_mode() ? 'test' : 'live';
     $orderby = isset($_GET['orderby']) ? $_GET['orderby'] : 'ID';
     $order = isset($_GET['order']) ? $_GET['order'] : 'DESC';
     $order_inverse = $order == 'DESC' ? 'ASC' : 'DESC';
     $status = isset($_GET['status']) ? $_GET['status'] : array('active', 'inactive');
     $meta_key = isset($_GET['meta_key']) ? $_GET['meta_key'] : null;
     $search = isset($_GET['s']) ? sanitize_text_field($_GET['s']) : null;
     $order_class = strtolower($order_inverse);
     $receipts = edd_ppe_get_receipts(array('posts_per_page' => $per_page, 'paged' => isset($_GET['paged']) ? $_GET['paged'] : 1, 'orderby' => $orderby, 'order' => $order, 'post_status' => $status, 'meta_key' => $meta_key, 's' => $search));
     if ($receipts) {
         foreach ($receipts as $receipt) {
             $download = edd_ppe_get_receipt_download($receipt->ID) ? get_the_title(edd_ppe_get_receipt_download($receipt->ID)) : '';
             $download_id = get_post_meta($receipt->ID, '_edd_receipt_download', true);
             $receipt_data[] = array('ID' => $receipt->ID, 'download' => '<a class="row-title" href="' . add_query_arg(array('edd-action' => 'edit_receipt', 'receipt' => $receipt->ID)) . '">' . $download . '</a>', 'status' => ucwords($receipt->post_status));
         }
     }
     return $receipt_data;
 }
Example #2
0
    ?>
 
						
						<option><?php 
    printf(__('Select %s', 'edd-ppe'), strtolower(edd_get_label_singular()));
    ?>
</option>

						<?php 
    foreach ($products as $product) {
        ?>
						<option value="<?php 
        echo absint($product->ID);
        ?>
" <?php 
        echo selected(edd_ppe_get_receipt_download($receipt_id), $product->ID, false);
        ?>
><?php 
        echo esc_html(get_the_title($product->ID));
        ?>
</option>

						<?php 
    }
    ?>

						<?php 
} else {
    ?>

							<option><?php