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

Process to migrate old gift level purchases to order meta. #45

Open
dparker1005 opened this issue Jul 13, 2021 · 1 comment
Open

Process to migrate old gift level purchases to order meta. #45

dparker1005 opened this issue Jul 13, 2021 · 1 comment

Comments

@dparker1005
Copy link
Member

This is a enhancement request based off of a conversation in #22.

In PMPro Gift Levels v1.0, we are beginning to save the gift code that is purchased into order meta; however, sites that were using PMPro Gift Levels before v1.0 do not currently have a way to add that metadata for old purchases. In order to find the order that was likely used to purchase a gift code, we would need to:

  1. Get the start date of the gift code
  2. Get the user associated with the gift code by looking through usermeta
  3. Find an order for that user for the day after the gift code starts

The steps above can run into issues if multiple gift codes were purchased on the same day or if the start date of the code or the order date is changed. Perhaps a quicker solution would be to add a field to the "Edit Order" page for admins to manually link a gift code to the order, though this would not be sufficient for larger sites.

More thought would be needed to create a solid migration process.

@kimcoleman
Copy link
Member

Do we think this is necessary at this point? We could still consider but as its 3 years later now I would think this is less of an issue to spend cycles on today.

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

No branches or pull requests

2 participants