Skip to content

Instantly share code, notes, and snippets.

@eri-trabiccolo
Created February 1, 2021 09:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eri-trabiccolo/974c0cbb238ffbded18cc4198356fb7a to your computer and use it in GitHub Desktop.
Save eri-trabiccolo/974c0cbb238ffbded18cc4198356fb7a to your computer and use it in GitHub Desktop.
<?php // <- do not copy this line
$triggers = array(
'achievement_earned',
'certificate_earned',
'course_complete',
'course_track_complete',
'enrollment',
'lesson_complete',
'manual_payment_due',
'payment_retry',
'purchase_receipt',
'quiz_failed',
'quiz_graded',
'quiz_passed',
'section_complete',
'student_welcome',
'subscription_cancelled',
);
foreach ( $triggers as $trigger ) {
add_filter(
'llms_notification_view'. $trigger .'_basic_options',
function ( $options ) {
$options['auto_dismiss'] = 0; // No automatic dismiss, or any value in milliseconds > 1000 = 1s.
return $options;
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment