Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prereq and dependency checks on post trash #263

Open
thomasplevy opened this issue Dec 1, 2016 · 3 comments
Open

prereq and dependency checks on post trash #263

thomasplevy opened this issue Dec 1, 2016 · 3 comments

Comments

@thomasplevy
Copy link
Member

@thomasplevy thomasplevy commented Dec 1, 2016

use action wp_trash_post (https://core.trac.wordpress.org/browser/tags/4.5.3/src/wp-includes/post.php#L2656) to perform lookups before trashing

Also check into untrash actions

course

  • remove prerequisites from any other courses
  • remove from membership auto-enrollment
  • cancel enrollments?
  • delete child sections
  • remove access plans (on deletion) (via #1518, #1522)

sections

  • unset lesson parent meta data

lesson

  • remove prerequisites from any other lessons
  • warnings on builder when lessons deleted (empty node on syllabus)

quiz

  • remove from any lessons
  • remove quiz attempts

questions

  • remove from any quizzes

track

  • remove prerequisite from any courses

membership

  • remove restriction settings from any post which supports membership restrictions
  • remove from members-only access plans
  • check and remove from site wide restriction setting
  • cancel enrollments?
  • remove access plans (on deletion) (via #1518, #1522)

user

  • postmeta cleanup
  • order anonymization
  • cancel recurring orders

User cleanup moved to #940

orders

  • related transactions

WIP: https://github.com/gocodebox/lifterlms/blob/master/includes/class.llms.post.relationships.php

@thomasplevy
Copy link
Member Author

@thomasplevy thomasplevy commented Oct 3, 2018

Transactions should be deleted when an order is deleted

thomasplevy added a commit that referenced this issue Oct 3, 2018
eri-trabiccolo added a commit to eri-trabiccolo/lifterlms-rest that referenced this issue Jul 31, 2019
Also prevent possible fatal errors trying to get siblings of a section with no parent course:
actually we should delete child sections when deleting courses see gocodebox/lifterlms#263
@eri-trabiccolo
Copy link
Member

@eri-trabiccolo eri-trabiccolo commented Jan 8, 2021

@thomasplevy
we should remove access plans when "parent" course/membership is permanently deleted, as we don't have the concept of an "orphan" access plan.
Should we add this to the list above or should we open a new issue?

@thomasplevy
Copy link
Member Author

@thomasplevy thomasplevy commented Jan 11, 2021

@eri-trabiccolo added above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants