Transfer Post Ownership on Purchase

Home / Code Snippets / Transfer Post Ownership on Purchase

This code snippet will make the buyer the new owner of a post set for sale using the Sell Content add-on in myCRED. Requires myCRED 1.6 or higher.

Copy the code into your child theme's functions.php file.

Last edited February 11, 2015

  1. I have a doubt here. If the member who purchases is assigned a user role of ‘subscriber’ and he purchased the post then will his role change to ‘author’? Will he or she be able to edit/delete the post?

    1. Of course not. Transferring ownership does not all of the sudden give you roles you do not have. If you are however a subscriber and get the ownership of the post, you will not be able to edit it since you will lack the editing capabilities.

Leave a Reply