• Resolved tonnick0033

    (@tonnick0033)


    Hello
    Wehen we delete a user on wordpress, we have 2 options with its content :
    1. delete content
    2. re assign content to another user

    –> both are not working with content of CPT.

    Once user deleted, the content remains without any autor !

    how can solve this issue ? how can we make work the native wordpress options with cpt content ?

    thx !

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Hi @tonnick0033

    Are you using multisite or single site?

    Are you willing to share your post type settings, via the Tools menu and the “Post Types” tab? Pasting me the blob of content on the right hand side will be enough for me to import those into my own local install for testing.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    As a followup, I was able to have it work in single site, but it didn’t work in multisite.

    That said, I don’t believe that’s anything we can control from our end, as we’re using the argument parameter the way it should be used.

    I do wonder if it’s a case of deleting from the individual site in multisite, or deleting absolutely and completely from the network admin, and that latter one not affecting the individual site.

    Thread Starter tonnick0033

    (@tonnick0033)

    hello
    let me clarify the process. This is single site. website is a directory of services built with acf and cpt.

    user first has to buy a subsciprtion. So, user is woocommerce customer.
    Then he has access to ACF Frontend for to create content on 2 CPT : services and professional. He can create its professional content and then, add services as content.

    But obviously, customer can stop its subsciption and let the website. When subscription is over, the content rollback to draft and is not displayed anymore.

    So, after some time, to keep all well organized, we’ll delete the user.

    As per wordpress native option, when you delete a user with content you have 2 options :
    1. delete content
    2. re assign content to another user

    so, we choose first option “delete content”

    But, even if user is deleted, the content remainns in CPT. the content is still here, without any user assigned.

    Seems that wordpress native option does not take in account CPT content when it has to perform those actions.

    I hope I clarified the way it’s working. just let me know if you need more info.

    Plugin Contributor Michael Beckwith

    (@tw2113)

    The BenchPresser

    Noted on all this, but that also doesn’t necessarily help on our part with CPTUI, since the only part we play with this is passing a boolean value to delete_with_user during the registration. We ourselves don’t add any extra functionality that’s meant to help with the process. So I don’t know what to say at this point.

    I know I was testing with I set a post type to true for deleting with the user, then logged in with an author user, created a post in the post type, and then deleted that user afterwards. I checked the post type list, and the post was gone. However I wasn’t doing anything fancy with things like ACF meta data and WooCommerce setup including subscriptions. So admittedly and definitely not a 1:1 test comparison, but there’s more at play here.

    Thread Starter tonnick0033

    (@tonnick0033)

    ooo I missed that point ! The CPT are created with delete_with_user false… I will change it to true and will check again !

    thx.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘delete user does not delete associated CPT’ is closed to new replies.