save_post_meta function is wrong. I have the fix
The function 'savepostmeta' that you can find in both class-woothemes-sensei-course.php and class-woothemes-sensei-lesson.php is wrong.
The line that calls addpostmeta should be replaced with this code:
if (add_post_meta( $post_id, $meta_key, $new_meta_value, true )==false)
update_post_meta( $post_id, $meta_key, $new_meta_value );
Why? Because a call to to 'addpostmeta' fails when the $unique argument is set to true and the custom field already exists. In those cases we should update the custom field.
We had problems with lessons that were already created and we wanted to update them (e.g. the lesson_course was set to NONE and we tried to assign a course to the lesson) and some properties would not be updated due to the above problem.
I hope you include this fix in the next release.
Thanks,
