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: prevent fatal error when click on resend receipt #4068

Closed
3 of 5 tasks
ravinderk opened this issue Mar 29, 2019 · 3 comments
Closed
3 of 5 tasks

fix: prevent fatal error when click on resend receipt #4068

ravinderk opened this issue Mar 29, 2019 · 3 comments
Assignees

Comments

@ravinderk
Copy link
Collaborator

ravinderk commented Mar 29, 2019

Bug Report

User Story

As an admin, I want to resend receipt without any failure.

ref: https://secure.helpscout.net/conversation/796694823/35676?folderId=848135#thread-2266009265

Current Behavior

I am getting a fatal error when click on resend receipt.
image
image

Expected Behavior

Resend receipt without any fatal error.

Bug Type

  • This bug describes functionality that once worked as expected in version X.X.X.
  • This bug describes functionality that never worked as expected.
  • I am not sure whether this functionality ever worked as expected.

Steps to Reproduce

  1. Add {donation_history_link} or {subscriptions_link} [or both] email to receipt
  2. Click on resend receipt button for any of donation
  3. you will get an error:
Call to a member function set_verify_key() on a non-object in /wp-content/plugins/give/includes/emails/class-give-email-tags.php on line 1238

Visuals

image

Possible Solution

Above mentioned email tags use Give_Email_Access class in logic but after refactoring that class only available only on the frontend, so to prevent fatal error we can load this class as backward compatibility on specific resend receipt event [ either bulk or single]

To prevent fatal error we can load this class for this email tag code.
ref: #3871

Acceptance Criteria

  • Resend receipt button is working fine when receipt email contains {donation_history_link} email tag.
  • Resend receipt button is working fine when receipt email contains {subscriptions_link} email tag.
@ravinderk ravinderk self-assigned this Mar 29, 2019
ravinderk added a commit that referenced this issue Mar 29, 2019
to prevent fatal error when click on resend receipt button

ref #4068
@Benunc
Copy link
Member

Benunc commented Apr 2, 2019

Another user reported the same issue with offline donations. To reproduce:

  1. Add the {donation_history_link} tag to the donation dreceipt email.
  2. Submit an offline donation from the front end
  3. Manually mark the donation as complete on the back end.

Error!

@ravinderk
Copy link
Collaborator Author

@Benunc I reviewed the above issue and confirming that it will be fixed by #4069

@ravinderk
Copy link
Collaborator Author

Note: I can reproduce same with subscriptions_link email tag from recurring addon. I updated acceptance criteria of this issue.

DevinWalker pushed a commit that referenced this issue Apr 3, 2019
fix: prevent fatal error when click on resend receipt #4068
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants