LLMS_Notification_Controller_Subscription_Cancelled::get_subscriber( string $subscriber )
Takes a subscriber type (student, author, etc) and retrieves a User ID
Parameters Parameters
- $subscriber
-
(string) (Required) subscriber type string
Return Return
(int|false)
Source Source
File: includes/notifications/controllers/class.llms.notification.controller.subscription.cancelled.php
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | protected function get_subscriber( $subscriber ) { switch ( $subscriber ) { case 'author' : $order = llms_get_post( $this ->post_id ); if ( ! $order ) { return false; } $product = $order ->get_product(); if ( ! $product ) { return false; } $uid = $product ->get( 'author' ); break ; default : $uid = false; } return $uid ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.17.8 | Introduced. |