LLMS_Notification_Controller_Upcoming_Payment_Reminder::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.upcoming.payment.reminder.php
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | protected function get_subscriber( $subscriber ) { switch ( $subscriber ) { case 'author' : $order = llms_get_post( $this ->post_id ); if ( ! is_a ( $order , 'LLMS_Order' ) ) { return false; } $product = $order ->get_product(); if ( is_a ( $product , 'WP_Post' ) ) { return false; } $uid = $product ->get( 'author' ); break ; case 'student' : $uid = $this ->user_id; break ; default : $uid = false; } return $uid ; } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.2.0 | Introduced. |