NextPaymentDate.php
1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
namespace ACA\WC\Column\OrderSubscription\Original;
use AC;
use ACA\WC\Editing;
use ACA\WC\Export;
use ACA\WC\Search;
use ACA\WC\Sorting;
use ACP;
class NextPaymentDate extends AC\Column implements ACP\Search\Searchable, ACP\Export\Exportable, ACP\Sorting\Sortable,
ACP\Editing\Editable
{
public function __construct()
{
$this->set_type('next_payment_date')
->set_original(true);
}
protected function get_meta_key(): string
{
return '_schedule_next_payment';
}
public function search()
{
return new Search\Meta\Date\ISO($this->get_meta_key(), 'order_subscription');
}
public function export()
{
return new Export\OrderSubscription\SubscriptionDate('next_payment');
}
public function editing()
{
return new Editing\OrderSubscription\Date('next_payment', true);
}
public function sorting()
{
return new Sorting\Order\OrderMeta(
$this->get_meta_key(),
new ACP\Sorting\Type\DataType(ACP\Sorting\Type\DataType::DATETIME)
);
}
}