Closed andergmartins closed 3 years ago
I can confirm this on PublishPress and TaxoPress
For EDD, the issue occurs only when the payment is completed. It won't be reproducible using the test payment. Only Strip or PayPal on test mode, at least.
When EDD creates the payment register, it creates a post of type edd_payment
. The post_author
on that post is the new client. The user that just bought the plan.
After this point, this is an issue for any plugin that follows the next steps, so not exclusive to EDD.
The issue starts when the filter user_has_cap
is applied for the created post. The method allow_coauthors_edit_post
is called, which calls is_multiple_author_for_post
. It then calls get_multiple_authors
, which has the bug itself.
The fix for issue #396 introduced the bug. The fix was intended to automatically fix the post and author relationship whenever it is detected the post has no author terms. It would work well if all the authors in custom post types should be added as Author on the site. That is not true, so we could still keep the code that fixes the post and author relationship, but remove the code that automatically creates the author for the specific user. If the user is an author already, we fix the relationship. If not, we add a message to the error log (if WP_DEBUG is enabled). Another option is still to create the author, but only if the queried post is activated for the Authors plugin.
Thanks for catching it, and the detailed explanation @andergmartins
It is important to mention that no user role or capability is changed when the author is being created, only the respective term of taxonomy author
.
It looks like every new customer on EDD gets an author profile. Maybe we have a conflict with the EDD plugin?