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

fix: ensure `Delete All Data` actually deletes all data #3638

raftaar1191 opened this issue Aug 30, 2018 · 6 comments


None yet
5 participants
Copy link

commented Aug 30, 2018

User Story

As an Admin I do not want that when deleting the donation from the Tools > Data > Delete All Data it should leave any meta in wp_give_donationmeta, wp_give_donormeta, wp_give_donors, wp_give_formmeta, wp_give_logmeta, wp_give_logs, wp_give_sequential_ordering

Current Behavior

I currently can see that meta are not getting delete from wp_give_donationmeta, wp_give_formmeta, wp_give_logmeta, wp_give_logs, wp_give_sequential_ordering

Expected Behavior

I expect all the meta should get deleted

Steps to Reproduce

Check the video


Video Link:

Acceptance Criteria

  • When Delete all data tool is used, Give data is removed from all tables BUT Give settings and custom tables are not removed.
  • When Give is uninstalled with Remove Data on Uninstall selected under Settings > Advanced tab, Give data and settings are removed AND custom tables are removed.


WordPress System Info ### WordPress Environment ###

Home URL: http://givewp.local
Site URL: http://givewp.local
WP Version: 4.9.8
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Show on Front: posts
Table Prefix Length: wp_
Table Prefix Length: 3
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription

Server Environment

Hosting Provider: DBH: localhost, SRV: givewp.local
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.10 (Debian)
PHP Version: 7.0.3
PHP Post Max Size: 1,000 MB
PHP Time Limit: 900
PHP Max Input Vars: 3000
PHP Max Upload Size: 1,000 MB
cURL Version: 7.38.0, OpenSSL/1.0.1t - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: 5.5.55 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.2.3
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions✔New User Registration✔User Registration Information✔Email access✔Daily Email Report✔Weekly Email Report✔Monthly Email Report✔Renewal Receipt Email✔Subscription Cancelled Email✔Subscription Completed EmailSubscription Reminder Email✔Subscriptions Email Access
Upgraded From: –
Test Mode: Enabled
Currency Code: USD
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: http://givewp.local/donation-confirmation/
Failure Page: http://givewp.local/donation-failed/
Donation History Page: http://givewp.local/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Offline Donation,, eCheck (ACH), Braintree, PayPal Payments Pro, PayPal Website Payments Pro (REST API), Paytm, Razorpay, WePay, Stripe - Credit Card, Stripe + Plaid, Stripe iDEAL, Dwolla Account
Default Payment Gateway: Test Donation
PayPal IPN Verification: Enabled
PayPal IPN Notifications: N/A
Donor Email Access: Enabled

Active Give Add-ons

Give - 2Checkout Gateway: Unlicensed – by WordImpress – 1.1.1
Give - Gateway: Unlicensed – by WordImpress – 1.4.2
Give - AWeber: Unlicensed – by WordImpress – 1.0.3
Give - Braintree Gateway: Unlicensed – by WordImpress – 1.2.2
Give - CCAvenue Gateway: Unlicensed – by WordImpress – 1.0.1
Give - ConvertKit: Unlicensed – by WordImpress – 1.0.1
Give - Currency Switcher: Unlicensed – by WordImpress – 1.2.2
Give - Display Donors: Unlicensed – by WordImpress, LLC – 1.0
Give - Dwolla Gateway: Unlicensed – by WordImpress – 1.1.2
Give - Email Reports: Unlicensed – by WordImpress – 1.1.2
Give - Fee Recovery: Unlicensed – by WordImpress – 1.7.2
Give - Form Countdown: Unlicensed – by WordImpress – 1.0
Give - Form Field Manager: Unlicensed – by WordImpress – 1.4.0
Give - Gift Aid: Unlicensed – by WordImpress – 1.1.6
Give - GoCardless Gateway: Unlicensed – by WordImpress – 1.2
Give - Google Analytics Donation Tracking: Unlicensed – by WordImpress – 1.2.1
Give - MailChimp: Unlicensed – by WordImpress – 1.4.1
Give - Manual Donations: Unlicensed – by WordImpress – 1.4.1
Give - Mollie Gateway: Unlicensed – by WordImpress – 1.1.2
Give - Paymill Gateway: Unlicensed – by WordImpress – 1.1
Give - PayPal Pro Gateway: Unlicensed – by WordImpress – 1.1.7
Give - Paytm Gateway: Unlicensed – by WordImpress – 1.0
Give - PDF Receipts: Unlicensed – by WordImpress – 2.3
Give - Razorpay: Unlicensed – by WordImpress – 1.2.0
Give - Recurring Donations: Unlicensed – by WordImpress – 1.7.2
Give - Stripe Gateway: Unlicensed – by WordImpress – 2.0.10
Give - Tributes: Unlicensed – by WordImpress – 1.4.2
Give - WePay Gateway: Unlicensed – by WordImpress – 1.3.1
Give - Zapier: Unlicensed – by WordImpress – 1.1.2

Other Active Plugins

Inactive Plugins

BuddyPress: by The BuddyPress Community – 3.0.0
Caldera Forms: by Caldera Labs –
Charitable: by WP Charitable – 1.6.1
Debug Bar: by wordpressdotorg – 0.9
Debug Bar Console: by koopersmith – 0.3
Debug Bar Cron: by Zack Tollman, Helen Hou-Sandi – 0.1.2
Debug Bar Extender: by Thorsten Ott, Automattic – 0.5
Developer: by Automattic – 1.2.6
Duplicate Post: by Enrico Battocchi – 3.2.2
Email Cop: by Ashfame – 0.1.1
Give - AmeriCloud Payments: by AmeriCloud Solutions, Inc. – 1.2.0
Give - Donation Upsells for WooCommerce: by WordImpress – 1.0.1
Give - Razorpay Recurring: by WP Buffs – 1.0
Gravity Forms: by rocketgenius – 2.2.6
Gravity Forms Signature Add-On: by Rocketgenius – 3.4
Gutenberg: by Gutenberg Team – 3.6.2
Loco Translate: by Tim Whitlock – 2.1.4
Log Deprecated Notices: by Andrew Nacin – 0.4
Log Viewer: by Markus Fischbacher – 14.05.04
Monster Widget: by Automattic – 0.3
PHP Compatibility Checker: by WP Engine – 1.4.5
Polylang: by Frédéric Demarle – 2.3.6
qTranslate-X: by qTranslate Team –
Query Monitor: by John Blackbourn & contributors – 3.0.1
Rewrite Rules Inspector: by Daniel Bachhuber, Automattic – 1.2.1
User Switching: by John Blackbourn & contributors – 1.3.1
WooCommerce: by Automattic – 3.4.1
WordPress Beta Tester: by Peter Westwood – 1.2.2
WP Hide & Security Enhancer: by Nsp Code –
WPML Multilingual CMS: by OnTheGoSystems – 3.9.4
WPS Hide Login: by WPServeur, NicolasKulka, tabrisrp –

Active MU Plugins

Local by Flywheel Relative URL (for Live Links): by Flywheel – 1.0


Name: Twenty Seventeen
Version: 1.7
Author URL:
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

@ravinderk ravinderk self-assigned this Aug 30, 2018

DevinWalker added a commit that referenced this issue Sep 4, 2018

Merge pull request #3654 from WordImpress/issue/3638
fix(db): delete row from give meta table when donation are being deleted #3638

This comment has been minimized.

Copy link

commented Oct 22, 2018

Re-opening this issue as it is not working properly and PHP notices are also generated

WordPress database error Unknown column 'comment_id' in 'IN/ALL/ANY subquery' for query DELETE FROM wp_give_commentmeta WHERE comment_id NOT IN (SELECT comment_ID FROM wp_comments) made by do_action('wp_ajax_give_do_ajax_export'), WP_Hook->do_action, WP_Hook->apply_filters, give_do_ajax_export, Give_Tools_Reset_Stats->process_step, Give_Tools_Reset_Stats->get_data, QM_DB->query

@mehul0810 mehul0810 reopened this Oct 22, 2018

@kevinwhoffman kevinwhoffman changed the title fix(db): delete row from give meta table when donation are being deleted fix: ensure `Delete All Data` actually deletes all data Oct 22, 2018


This comment has been minimized.

Copy link

commented Oct 22, 2018

Call Summary

Participants: @kevinwhoffman @mehul0810
Topic: Which data is getting left behind when Delete All Data is selected
Result: Mehul explained that after Give 2.2.0, custom tables were not being removed when Delete All Data was selected. This issue was meant to remove all custom tables, however there is an error occurring related to comment_id that is preventing the deletion from completing successfully. See #3638 (comment) for more info.

@mehul0810 mehul0810 referenced this issue Oct 22, 2018


chore: ensure quality of Give v2.3.0 #3737

16 of 16 tasks complete

This comment has been minimized.

Copy link

commented Oct 23, 2018

@mehul0810 Please move forward with the fix for this issue. If you can resolve by end of day, we'll merge it into 2.3.0. Otherwise bump it to 2.3.1.


This comment has been minimized.

Copy link

commented Oct 23, 2018

@mehul0810 While investigating this issue, please check that we are also properly removing all Give data including custom tables when Give is uninstalled with the option to Remove Data on Uninstall selected.


This comment has been minimized.

Copy link

commented Oct 23, 2018

@kevinwhoffman Let me simplify a bit:
(1) With "Delete All Data" Tool, we will remove all the data from the Give related tables, not removing the tables itself.
(2) With "Remove Data on Uninstall" under Settings > Advanced, we will remove the related Give tables.

I'm updating the acceptance criteria in the description of this issue.


This comment has been minimized.

Copy link

commented Oct 23, 2018

@mehul0810 Yes, good point of clarification. I updated the acceptance criteria to be as clear as possible.

ravinderk added a commit that referenced this issue Oct 23, 2018

Merge pull request #3793 from impress-org/issue/3638
fix: ensure `Delete All Data` actually deletes all data #3638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.