gocodebox / lifterlms

LifterLMS, a WordPress LMS Solution: Easily create, sell, and protect engaging online courses.
https://lifterlms.com
GNU General Public License v3.0
181 stars 135 forks source link

Delete order notes (and related meta) when wiping all the data on uninstall #2322

Closed eri-trabiccolo closed 1 year ago

eri-trabiccolo commented 1 year ago

Reproduction Steps

Expected Behavior

Actual Behavior

Error Messages / Logs

n/a

System and Environment Information

LifterLMS 7.0.1

This issue has be recreated:

Browser, Device, and Operating System Information

n/a

actuallyakash commented 1 year ago

Hey @eri-trabiccolo,

I've added the WPDB delete query to delete the data which have a llms_order_note comment_type. Let me know, if anything needs to be changed in the PR. Thanks!

eri-trabiccolo commented 1 year ago

@actuallyakash I think that the proposed PR doesn't remove the comments meta. See as reference, what WooCommerce does, we should do basically the same thing with our order notes. https://github.com/woocommerce/woocommerce/blob/012a8b4655d52ba5a18f6cb787b29a6fd50e73f0/plugins/woocommerce/uninstall.php#L73-L74

actuallyakash commented 1 year ago

@eri-trabiccolo

Just pushed another commit. Thanks for your suggestions.

The queries are working fine, tested manually.