Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace example;
- class Subscription {
- /**
- * @var \EDD_Subscription
- */
- protected $subscription;
- /**
- *
- * @param \EDD_Subscription $subscription
- */
- public function __construct( \EDD_Subscription $subscription ){
- $this->subscription = $subscription;
- }
- /**
- * @return bool
- */
- public function statusActive() : bool
- {
- return in_array( $this->subscription->get_status(), [
- 'active',
- 'trialing'
- ]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement