PluginProbe
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More / 2.4.1
Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More v2.4.1
2.4.1 2.4.0 2.3.4 2.3.3 2.3.2 2.3.1 2.3.0 2.2.2 2.2.1 2.2.0 2.1.2 2.1.1 trunk 0.0.1 0.0.2 0.0.3 0.0.4 0.0.5 0.0.6 0.0.7 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 All 68 releases
better-payment / includes / Models / TransactionModel.php

TransactionModel.php in Better Payment – Instant Payments, Donations, Fundraising with Subscriptions & More 2.4.1, at includes/Models/TransactionModel.php

39 lines 944 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Better_Payment\Lite\Models;
4
5 use Better_Payment\Lite\Admin\DB;
6 use Better_Payment\Lite\Model;
7
8 /**
9 * The Transaction handler database class
10 *
11 * @since 0.0.4
12 */
13 class TransactionModel extends Model {
14
15 /**
16 * Initialize the class
17 *
18 * @since 0.0.4
19 */
20 public function __construct( ) {
21 parent::__construct();
22 }
23
24 /**
25 * Transactions for the CSV export.
26 *
27 * @param array $args DB::get_transactions() filters.
28 * @param string $version 'v2' filters `status` by the admin list's tab buckets; 'v1' by raw status.
29 * @return array
30 */
31 public function get_transactions($args = [], $version = 'v1') {
32 // Set default per_page if not provided
33 if (!isset($args['per_page'])) {
34 $args['per_page'] = '999999999';
35 }
36 $all_transactions = DB::get_transactions($args, 0, $version);
37 return $all_transactions;
38 }
39 }