PluginProbe
GiveWP – Donation Plugin and Fundraising Platform / 4.16.9
GiveWP – Donation Plugin and Fundraising Platform v4.16.9
4.16.9 4.16.8.1 4.16.8 4.16.7.2 4.16.7.1 4.16.7 4.16.6.1 4.16.6 4.16.5.1 4.16.5 4.16.4 4.16.3 4.16.2 4.16.1 4.16.0 4.15.5 4.15.4 4.15.3 4.15.2 4.15.1 4.15.0 2.3.0 2.3.1 2.3.2 2.30.0 All 255 releases
give / src / Donations / ValueObjects / DonationType.php

DonationType.php in GiveWP – Donation Plugin and Fundraising Platform 4.16.9, at src/Donations/ValueObjects/DonationType.php

39 lines 828 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Give\Donations\ValueObjects;
6
7 use Give\Framework\Support\ValueObjects\Enum;
8
9 /**
10 * @since 2.23.0
11 *
12 * @method static DonationType SINGLE()
13 * @method static DonationType SUBSCRIPTION()
14 * @method static DonationType RENEWAL()
15 * @method bool isSingle()
16 * @method bool isSubscription()
17 * @method bool isRenewal()
18 */
19 class DonationType extends Enum
20 {
21 // A single donation with no recurrence
22 const SINGLE = 'single';
23
24 // The first donation for a new subscription
25 const SUBSCRIPTION = 'subscription';
26
27 // A subsequent donation for an existing subscription
28 const RENEWAL = 'renewal';
29
30 /**
31 * Whether this donation is recurring or not
32 * @since 2.24.0
33 */
34 public function isRecurring(): bool
35 {
36 return ! $this->isSingle();
37 }
38 }
39