Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. namespace example;
  3.  
  4. class Subscription {
  5.  
  6. /**
  7. * @var \EDD_Subscription
  8. */
  9. protected $subscription;
  10.  
  11. /**
  12. *
  13. * @param \EDD_Subscription $subscription
  14. */
  15. public function __construct( \EDD_Subscription $subscription ){
  16. $this->subscription = $subscription;
  17. }
  18.  
  19. /**
  20. * @return bool
  21. */
  22. public function statusActive() : bool
  23. {
  24. return in_array( $this->subscription->get_status(), [
  25. 'active',
  26. 'trialing'
  27. ]);
  28.  
  29. }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement