Advertisement
verygoodplugins

Untitled

Nov 30th, 2022
802
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.25 KB | None | 0 0
  1. function custom_course_completed( $data ) {
  2.  
  3.     update_user_meta( $data['user']->ID, 'ld_last_course_completed', get_post_field( 'post_title', $data['course']->ID, 'raw' ) );
  4.  
  5. }
  6.  
  7. add_action( 'learndash_course_completed', 'custom_course_completed', 5 );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement