Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Move discount codes to custom table #5277
For numerous reasons, including performance and flexibility, discount codes should be moved to a custom table.
This will help lay the foundation for moving payments and sale logs to custom tables.
Pull Request: #6224
New database schema
There are two new tables being introduced:
These files hold the DB interaction layers for discounts and discount meta.
Changes to EDD_Discount
The existing helper functions for discounts in
Backwards compatibility layer
A full upgrade and migration routine has been added that moves discounts from the old
The upgrade routine includes a second step for removing legacy data.
The discount tests have been up into two sections:
So long as the legacy tests continue to pass without changes, we're pretty safe in knowing the BC layer is good.
Notes for testing