CustomerEntity.php
3 months ago
CustomerFactory.php
2 months ago
CustomerStatus.php
3 years ago
index.php
3 years ago
CustomerStatus.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace ProfilePress\Core\Membership\Models\Customer; |
| 4 | |
| 5 | class CustomerStatus |
| 6 | { |
| 7 | const ACTIVE = 'active'; |
| 8 | const INACTIVE = 'inactive'; |
| 9 | |
| 10 | public static function get_all() |
| 11 | { |
| 12 | return apply_filters('ppress_order_statuses', [ |
| 13 | self::ACTIVE => __('Active', 'wp-user-avatar'), |
| 14 | self::INACTIVE => __('Inactive', 'wp-user-avatar') |
| 15 | ]); |
| 16 | } |
| 17 | |
| 18 | public static function get_label($status) |
| 19 | { |
| 20 | return self::get_all()[$status] ?? ''; |
| 21 | } |
| 22 | } |