SubscriptionBillingFrequency.php
3 years ago
SubscriptionEntity.php
1 year ago
SubscriptionFactory.php
3 years ago
SubscriptionStatus.php
3 years ago
SubscriptionTrialPeriod.php
3 years ago
index.php
3 years ago
SubscriptionTrialPeriod.php
32 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePress\Core\Membership\Models\Subscription; |
| 4 | |
| 5 | class SubscriptionTrialPeriod |
| 6 | { |
| 7 | const DISABLED = 'disabled'; |
| 8 | const THREE_DAYS = '3_day'; |
| 9 | const FIVE_DAYS = '5_day'; |
| 10 | const ONE_WEEK = '1_week'; |
| 11 | const TWO_WEEKS = '2_week'; |
| 12 | const THREE_WEEKS = '3_week'; |
| 13 | const ONE_MONTH = '1_month'; |
| 14 | |
| 15 | public static function get_all() |
| 16 | { |
| 17 | return apply_filters('ppress_subscription_trial_periods', [ |
| 18 | self::DISABLED => __('Disabled', 'wp-user-avatar'), |
| 19 | self::THREE_DAYS => __('3 Days', 'wp-user-avatar'), |
| 20 | self::FIVE_DAYS => __('5 Days', 'wp-user-avatar'), |
| 21 | self::ONE_WEEK => __('One Week', 'wp-user-avatar'), |
| 22 | self::TWO_WEEKS => __('Two Weeks', 'wp-user-avatar'), |
| 23 | self::THREE_WEEKS => __('Three Weeks', 'wp-user-avatar'), |
| 24 | self::ONE_MONTH => __('One Month', 'wp-user-avatar') |
| 25 | ]); |
| 26 | } |
| 27 | |
| 28 | public static function get_label($status) |
| 29 | { |
| 30 | return self::get_all()[$status] ?? ''; |
| 31 | } |
| 32 | } |