__( 'New Order Email', 'learnpress' ), 'description' => __( 'Sent to admin & instructor when a new order is placed.', 'learnpress' ), 'key' => 'new_order', 'email_ids' => array( 'new-order-admin', 'new-order-instructor' ), ), array( 'name' => __( 'Order Completed Email', 'learnpress' ), 'description' => __( 'Sent to student when payment is confirmed.', 'learnpress' ), 'key' => 'order_completed', 'email_ids' => array( 'completed-order-user' ), ), array( 'name' => __( 'Course Enrolled Email', 'learnpress' ), 'description' => __( 'Sent to student when enrolled into a course.', 'learnpress' ), 'key' => 'course_enrolled', 'email_ids' => array( 'enrolled-course-user' ), ), array( 'name' => __( 'Course Completed Email', 'learnpress' ), 'description' => __( 'Sent to student upon finishing a course.', 'learnpress' ), 'key' => 'course_completed', 'email_ids' => array( 'finished-course-user' ), ), array( 'name' => __( 'Become Instructor Request', 'learnpress' ), 'description' => __( 'Sent to admin when a user applies to become a teacher.', 'learnpress' ), 'key' => 'become_instructor_request', 'email_ids' => array( 'become-an-instructor' ), ), array( 'name' => __( 'Become Instructor Accepted', 'learnpress' ), 'description' => __( 'Sent to applicant when approved.', 'learnpress' ), 'key' => 'become_instructor_accepted', 'email_ids' => array( 'instructor-accepted' ), ), ); $enabled_notifications = 0; foreach ( $email_notifications as &$email_notification ) { $email_notification['enabled'] = true; foreach ( $email_notification['email_ids'] as $email_id ) { $email = LP_Emails::get_email( $email_id ); if ( ! $email || ! $email->enable() ) { $email_notification['enabled'] = false; break; } } if ( $email_notification['enabled'] ) { ++$enabled_notifications; } } unset( $email_notification ); $has_enabled_notifications = $enabled_notifications === count( $email_notifications ); ?>
| sprintf( 'settings[emails][notifications][%s]', $email['key'] ), 'value' => $email['enabled'], 'classes' => 'lp-setup-email-notification' ) ); ?> |