@megacheb
Everything looks good in code, so there might be some minor mistake.
Please check:
- if you error log does not reference to osp_email_expired function
- if email template osp_email_expired exists in your osclass
Thanks for your reply.
My error log does not consist any information about osp_email_expired function
Email template present and work (i made some test).
I think, something wrong in function osp_email_expired($item, $notify) in email.php,
probably in this piece of code :
foreach($types as $type) {
if(!in_array($type, $notify)) {
if($type == OSP_TYPE_PREMIUM) {
$content['s_text'] = preg_replace('|{START_PREMIUM}(.*){END_PREMIUM}|', '', $content['s_text']);
} else if($type == OSP_TYPE_HIGHLIGHT) {
$content['s_text'] = preg_replace('|{START_HIGHLIGHT}(.*){END_HIGHLIGHT}|', '', $content['s_text']);
} else if($type == OSP_TYPE_REPUBLISH) {
$content['s_text'] = preg_replace('|{START_REPUBLISH}(.*){END_REPUBLISH}|', '', $content['s_text']);
} else {
return false;
}
}
}
I think, this function always return FALSE, and email dont send.
When i change if(!in_array($type, $notify)) to if(in_array($type, $notify)) i receive email, but in body of email i see all premium services, not only expired.