本文整理汇总了PHP中WooThemes_Sensei_Utils::sensei_user_passed_course方法的典型用法代码示例。如果您正苦于以下问题:PHP WooThemes_Sensei_Utils::sensei_user_passed_course方法的具体用法?PHP WooThemes_Sensei_Utils::sensei_user_passed_course怎么用?PHP WooThemes_Sensei_Utils::sensei_user_passed_course使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WooThemes_Sensei_Utils
的用法示例。
在下文中一共展示了WooThemes_Sensei_Utils::sensei_user_passed_course方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: trigger
/**
* trigger function.
*
* @access public
* @return void
*/
function trigger($user_id = 0, $course_id = 0)
{
global $woothemes_sensei, $sensei_email_data;
// Get learner user object
$this->user = new WP_User($user_id);
// Get passed status
$passed = __('passed', 'woothemes-sensei');
if (!WooThemes_Sensei_Utils::sensei_user_passed_course($course_id, $user_id)) {
$passed = __('failed', 'woothemes-sensei');
}
// Construct data array
$sensei_email_data = apply_filters('sensei_email_data', array('template' => $this->template, 'heading' => $this->heading, 'user_id' => $user_id, 'course_id' => $course_id, 'passed' => $passed), $this->template);
// Set recipient (learner)
$this->recipient = stripslashes($this->user->user_email);
// Send mail
$woothemes_sensei->emails->send($this->recipient, $this->subject, $woothemes_sensei->emails->get_content($this->template));
}
开发者ID:mattytemple,项目名称:YTC-Sensei,代码行数:23,代码来源:class-woothemes-sensei-email-learner-completed-course.php