send triggered emails!
Showing
1 changed file
with
2 additions
and
23 deletions
| ... | @@ -240,8 +240,8 @@ function send_triggered_notification($uid,$trigger="NO_TRIGGER",$args = array(), | ... | @@ -240,8 +240,8 @@ function send_triggered_notification($uid,$trigger="NO_TRIGGER",$args = array(), |
| 240 | 240 | ||
| 241 | 241 | ||
| 242 | // if is_email =========================================== | 242 | // if is_email =========================================== |
| 243 | if ($notification->is_email && ( (isset($notify_me) && $notify_me) || $send_override)) { | 243 | if ($notification->is_email) { |
| 244 | send_email($uid,$email,$args,$send_override); | 244 | send_email($uid,$email,$args); |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | 247 | ||
| ... | @@ -255,27 +255,6 @@ function send_email($uid, $contents,$args) { | ... | @@ -255,27 +255,6 @@ function send_email($uid, $contents,$args) { |
| 255 | if ($uid > 0) { | 255 | if ($uid > 0) { |
| 256 | $user = new WP_User($uid); | 256 | $user = new WP_User($uid); |
| 257 | $to_email = $user->user_email;//get_user_meta($uid,'home_email',true); | 257 | $to_email = $user->user_email;//get_user_meta($uid,'home_email',true); |
| 258 | |||
| 259 | /* | ||
| 260 | $preference = get_user_meta($uid, 'email_address_preference',true); | ||
| 261 | |||
| 262 | if ($preference == "Home") { | ||
| 263 | $to_email = get_user_meta($uid,'home_email',true); | ||
| 264 | } elseif ($preference == "Work") { | ||
| 265 | $to_email = get_user_meta($uid,'company_email',true); | ||
| 266 | } else { | ||
| 267 | $to_email = $user->user_email; | ||
| 268 | } | ||
| 269 | |||
| 270 | if (!(boolean)filter_var($to_email, FILTER_VALIDATE_EMAIL)) { | ||
| 271 | $to_email = $user->user_email; | ||
| 272 | } | ||
| 273 | */ | ||
| 274 | |||
| 275 | |||
| 276 | |||
| 277 | } elseif (isset($args['email']) && !empty($args['email'])) { | ||
| 278 | $to_email = $args['email']; | ||
| 279 | } else { | 258 | } else { |
| 280 | return; | 259 | return; |
| 281 | } | 260 | } | ... | ... |
-
Please register or sign in to post a comment