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
345 stars 191 forks source link

fix: improve UX of "View in Browser" link #3964

Closed Benunc closed 5 years ago

Benunc commented 5 years ago

Bug Report

User Story

As a donor, I want to only have to click once in an email to verify that I have access to my donation history.

(this is essentially a rewrite of functionality that was supposed to be added in #1790)

Current Behavior

The "View in Browser" link only works in a browser with an active session.

Expected Behavior

I expect for a link clicked in an email to take me to the receipt, not to an email access form, even if I am not logged into the site in that browser.

Bug Type

Steps to Reproduce

  1. Enable email access on the site, and create a form where no account is required.
  2. Ensure that the Donation Receipt email contains the {receipt_link} email tag.
  3. In an incognito browser window, create a donation with an email you have access to (or mailhog if on local)
  4. Close all incognito windows after completing the donation.
  5. Click the "View this receipt in your browser" link ensuring that it opens in a browser without an active session. (copy-paste into a new incognito browser if needed)
  6. An email access form is shown.

Possible Solution

Related

1790

https://secure.helpscout.net/conversation/763346930/0/?folderId=672194

Acceptance Criteria

Environment

Operating System
  • Platform: Mac OS X | Microsoft Windows | Linux | Android | iOS
  • Version: X.X.X
Browser
  • Name: Chrome | Firefox | Safari | IE | Edge
  • Version: X.X.X
WordPress System Info ### WordPress Environment ### Home URL: http://localgive.local Site URL: http://localgive.local WP Version: 5.0.3 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: localgive.local TLS Connection: Connection uses TLS 1.2 TLS Connection: Probably Okay Server Info: nginx/1.10.1 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.60 - 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.4.0 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✔Donor Note✔Email access❌Renewal Receipt Email❌Renewal Receipt Email❌Subscription Cancelled Email❌Subscription Cancelled Email❌Subscription Completed Email❌Subscription Reminder Email✔Subscriptions Email Access Upgraded From: – Test Mode: Enabled Currency Code: USD Currency Position: Before Decimal Separator: . Thousands Separator: , Success Page: http://localgive.local/donation-confirmation/ Failure Page: http://localgive.local/donation-failed/ Donation History Page: http://localgive.local/donation-history/ Give Forms Slug: /donations/ Enabled Payment Gateways: Test Donation, Offline Donation, Stripe - Credit Card Default Payment Gateway: Stripe - Credit Card PayPal IPN Verification: Enabled PayPal IPN Notifications: N/A Donor Email Access: Enabled ### Active Give Add-ons ### Give - Authorize.net Gateway: ❌ Unlicensed – by GiveWP – 1.4.5 Give - Manual Donations: ❌ Unlicensed – by WordImpress – 1.4.1 Give - Mollie Gateway: ❌ Unlicensed – by GiveWP – 1.2.1 Give - PDF Receipts: ❌ Unlicensed – by GiveWP – 2.3.2 Give - Recurring Donations: ❌ Unlicensed – by GiveWP – 1.8.3 Give - Stripe Gateway: ❌ Unlicensed – by GiveWP – 2.1.3 Give - Tributes: ❌ Unlicensed – by GiveWP – 1.5.2 ### Other Active Plugins ### Ben's Helper Functions: by BenUNC – ### Inactive Plugins ### Better Search Replace: by Delicious Brains – 1.3.2 Debug Bar: by wordpressdotorg – 1.0 Debug Bar Post Meta: by whyisjake – 0.5.5 Divi Builder: by Elegant Themes – 2.3.1 Duplicate Post: by Enrico Battocchi – 3.2.2 Elegant Themes Support: by Elegant Themes – 1.3 Fusion Builder: by ThemeFusion – 1.0.6 Fusion Core: by ThemeFusion – 3.0.6 Give - 2Checkout Gateway: by WordImpress – 1.0.2 Give - Annual Receipts: by GiveWP – 1.0.0 Give - Braintree Gateway: by WordImpress – 1.2.2 Give - CCAvenue Gateway: by GiveWP – 1.0.2 Give - Constant Contact: by WordImpress – 1.2.1 Give - ConvertKit: by WordImpress – 1.0.2 Give - Currency Switcher: by GiveWP – 1.3.0 Give - Dwolla Gateway: by WordImpress – 1.1.2 Give - Email Reports: by WordImpress – 1.1.2 Give - Fee Recovery: by WordImpress – 1.7.0 Give - Form Countdown: by WordImpress – 1.0.1 Give - Form Field Manager: by GiveWP – 1.4.0 Give - Google Analytics Donation Tracking: by GiveWP – 1.2.2 Give - Hook Helper: by Ravinder Kumar – 1.0 Give - iATS Payment Solutions: by WordImpress – 1.0.2 Give - MailChimp: by GiveWP – 1.4.3 Give - Old Meta Switcher: by WordImpress – 1.0 Give - PayFast Payment Gateway: by WordImpress – 1.0.2 Give - Paymill Gateway: by WordImpress – 1.1 Give - PayPal Pro Gateway: by WordImpress – 1.1.6 Give - Paytm Gateway: by WordImpress – 1.0 Give - PayUmoney: by WordImpress – 1.0.1 Give - Per Form Gateways: by WordImpress – 1.0.1 Give - Razorpay: by WordImpress – 1.1.3 Give - Recurring Helper: by WordImpress – 1.0 Give - Update Goal Progress: by Matt Cromwell – 1.0 Give - WePay Gateway: by WordImpress – 1.3.1 Give - WP All Import Addon: by Ben Meredith – 1.0 Give - Zapier: by WordImpress – 1.2.1 Give Stripe Cleanup.: by BenUNC – Hello Dolly: by Matt Mullenweg – 1.6 Transients Manager: by Pippin Williamson – 1.7.5 User Switching: by John Blackbourn & contributors – 1.4.0 ### Active MU Plugins ### Bypass Login: by Stephen Carnam – 1.1.0 hide-give-license-warning.php: by – Local by Flywheel Relative URL (for Live Links): by Flywheel – 1.0 ### Theme ### Name: Twenty Seventeen Version: 2.0 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
mehul0810 commented 5 years ago

Slack Call Summary

Participants: @mehul0810 @ravinderk Topic: Discussion on the workflow of the issue Result: I'll simplify the Ajaxified donation receipt code so that it works properly and will use action and _give_hash parameter to show the view it in browser link without any session and the links for viewing donation receipt on donation history page will work as it is with email access form.

mehul0810 commented 5 years ago

Slack Call Summary

Participants: @mehul0810 @ravinderk Topic: Discussion about the issue faced related to outputting the donation receipt via AJAX Result: On discussion, Ravinder noticed that I've not started the output buffer but not ended it due to which it is conflicting with displaying the donation receipt.