Advertisement
verygoodplugins

Untitled

Nov 1st, 2021
1,165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. function wpf_course_access_debug( $user_id, $course_id, $access_list = array(), $remove = false ) {
  2.  
  3.     if ( ! function_exists( 'wpf_log' ) ) {
  4.         return;
  5.     }
  6.  
  7.     wpf_log( 'notice', $user_id, 'DEBUG User enrolled in course ' . get_the_title( $course_id ) . ': <pre>' . print_r( debug_backtrace( DEBUG_BACKTRACE_IGNORE_ARGS, 50 ), true ) . '</pre>' );
  8.  
  9. }
  10.  
  11. add_action( 'learndash_update_course_access', 'wpf_course_access_debug', 10, 4 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement