impress-org / givewp

GiveWP - The #1 Donation Plugin for WordPress. Easily accept donations and fundraise using your WordPress website.
https://givewp.com/
GNU General Public License v3.0
340 stars 191 forks source link

fix(admin-donor): ensure Admin can disconnect User in Donor Edit page #3636

Closed samsmith89 closed 6 years ago

samsmith89 commented 6 years ago

User Story

As a site admin, I want to disconnect a User from a Donor, because a recently fixed issue resulted in Users with the same Donor ID and User ID were both showing up in the Donation History page of the User so that Donor information stays private.

Current Behavior

I currently can't disconnect a donor.

Expected Behavior

I expect to disconnect a donor in order to disassociate that user with the donor, and have the donation not appear in the Users Doantion History page.

Steps to Reproduce

  1. Create a User with a role of Give Donor
  2. Donate with the Give Donor
  3. Sign in as an admin
  4. Navigate to the Donor Edit page
  5. Attempt to disconnect the donor
  6. Page doens't reload and doesn't disconnect the donor

Visuals

screen shot 2018-08-29 at 9 30 13 am

No console errors.

Related

https://secure.helpscout.net/conversation/643751488/23726?folderId=1823994

Link to previously fixed issue: https://github.com/WordImpress/Give/issues/3333

Environment

WordPress System Info ### WordPress Environment ### Home URL: http://give.local Site URL: http://give.local WP Version: 4.9.8 WP Multisite: – WP Memory Limit: 256 MB WP Debug Mode: – WP Cron: ✔ Language: en_US Permalink Structure: /%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: give.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.6.34 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 Email✔Subscription Reminder Email✔Subscriptions Email Access Upgraded From: 2.2.3 Test Mode: Enabled Currency Code: USD Currency Position: Before Decimal Separator: . Thousands Separator: , Success Page: http://give.local/donation-confirmation/ Failure Page: http://give.local/donation-failed/ Donation History Page: http://give.local/donation-history/ Give Forms Slug: /donations/ Enabled Payment Gateways: Stripe - Credit Card, Test Donation, Authorize.net, Razorpay, Offline Donation Default Payment Gateway: Stripe - Credit Card PayPal IPN Verification: Disabled PayPal IPN Notifications: N/A Donor Email Access: Enabled ### Active Give Add-ons ### Give - Authorize.net Gateway: ✔ Licensed – by WordImpress – 1.4.2 Give - Braintree Gateway: ✔ Licensed – by WordImpress – 1.2.2 Give - CCAvenue Gateway: ✔ Licensed – by WordImpress – 1.0.2 Give - Email Reports: ✔ Licensed – by WordImpress – 1.1.2 Give - Fee Recovery: ✔ Licensed – by WordImpress – 1.7.1 Give - Form Field Manager: ✔ Licensed – by WordImpress – 1.3 Give - MailChimp: ✔ Licensed – by WordImpress – 1.4.1 Give - Manual Donations: ✔ Licensed – by WordImpress – 1.4.1 Give - PayPal Pro Gateway: ✔ Licensed – by WordImpress – 1.1.6 Give - Paytm Gateway: ✔ Licensed – by WordImpress – 1.0 Give - PDF Receipts: ✔ Licensed – by WordImpress – 2.3 Give - Razorpay: ❌ Unlicensed – by WordImpress – 1.2.0 Give - Recurring Donations: ✔ Licensed – by WordImpress – 1.7.2 Give - Stripe Gateway: ✔ Licensed – by WordImpress – 2.0.10 Give - Tributes: ✔ Licensed – by WordImpress – 1.5.0 ### Other Active Plugins ### Give - Hook Helper: by Ravinder Kumar – 1.0 Sam's Helper Function: by WordImpress – 1.0 WP Business Reviews: by Impress.org – 1.0.0 WPML Media: by OnTheGoSystems – 2.3.5 WPML Multilingual CMS: by OnTheGoSystems – 4.0.5 WPML Sticky Links: by OnTheGoSystems – 1.4.4 WPML String Translation: by OnTheGoSystems – 2.8.5 WPML Translation Management: by OnTheGoSystems – 2.6.5 ### Inactive Plugins ### All-in-One WP Migration: by ServMask – 6.73 Duplicate Post: by Enrico Battocchi – 3.2.2 Give - Donation Upsells for WooCommerce: by WordImpress – 1.0.2 Indeed Ultimate Affiliate Pro: by indeed – 1.5 Mailgun: by Mailgun – 1.5.11 Page Builder by SiteOrigin: by SiteOrigin – 2.7.3 The7 Elements: by Dream-Theme – 1.11.0.1 The7 Ultimate Addons for WPBakery Page Builder: by Brainstorm Force – 3.16.24 ThemeREX Addons: by ThemeREX – 1.6.24 User Role Editor: by Vladimir Garagulya – 4.44 WooCommerce: by Automattic – 3.4.4 WooCommerce Paytm Payment Gateway: by Paytm – 0.2 WooCommerce Paytm Payment Gateway: by FTI Technologies – 1.0 WP Courseware: by Fly Plugins – 4.4.4 WP Rocket: by WP Media – 3.0.5.1 ### Active MU Plugins ### Bypass Login: by Stephen Carnam – 1.1.0 ### Theme ### Name: Twenty Seventeen Version: 1.7 Author URL: https://wordpress.org/ 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
Operating System
  • Platform: Mac OS X
Browser
  • Name: Chrome
ravinderk commented 6 years ago

@DevinWalker I found that this PR cause of the issue: https://github.com/WordImpress/Give/pull/3228 In this PR, we renamed the input field but did not update in JS:https://github.com/WordImpress/Give/commit/263c93edc5ff9c4641b7b5cabc3ef7a664a2888f

DevinWalker commented 6 years ago

Good catch @ravinderk thanks for debugging this...

This is something we can likely test with @Sidsector9's work