You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It may be that this is running but then being immediately overwritten by the post_author field from the WP core rest call. We may need to:
A) Remove the post_author support for the post types
B) Remove post_author from the REST schema for the post types
C) Change action priority?
D) Add a new on update hook to set the post author to the primary instructor, we already have what appears to be redundant code attempting to to this here:
Reproduction Steps
Expected Behavior
Actual Behavior
Notes
You could also remove the original primary instructor and replace them with a new instructor and the post author won't change.
Something is going wrong here where the primary instructor is supposed to be automatically set as the post_author during updates:
https://github.com/gocodebox/lifterlms/blob/18d938219de427cbf4c57894dc7b81c87ebafd45/includes/models/model.llms.post.instructors.php#L162
It may be that this is running but then being immediately overwritten by the post_author field from the WP core rest call. We may need to:
A) Remove the post_author support for the post types
B) Remove post_author from the REST schema for the post types
C) Change action priority?
D) Add a new on update hook to set the post author to the primary instructor, we already have what appears to be redundant code attempting to to this here:
lifterlms-blocks/includes/class-llms-blocks-post-instructors.php
Lines 102 to 118 in e8517d9
That code can probably be removed regardless because it's already being done when the instructors are set.
See related gocodebox/lifterlms#1953
The text was updated successfully, but these errors were encountered: