-
Notifications
You must be signed in to change notification settings - Fork 191
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
Issue/509 #1140
Issue/509 #1140
Conversation
$status is the database value of the current payment’s post_status. $status_label is a translated string. We need the database value for logic and translated string for display.
Love the examples! Thanks! |
@kevinwhoffman Looks really awesome. Only one nit-picky item, I think the filter should be called |
@mathetos I'm good with that, but I think we should be consistent and do the same for the shortcode attribute, which is currently named In summary, the new additions would be:
|
@kevinwhoffman Ya, makes sense. Why are these checks failing? |
@mathetos I pushed those changes and edited my first comment in this PR so the documentation and examples will reflect the correct name usage. |
Description
Improves receipt-viewing experience discussed in #509 with the following changes:
payment_key
query arg in URL.[give_receipt]
shortcode has two new attributes:payment_status
determines whether status row within receipt is displayed. Defaultfalse
.status_notice
determines whether notice above receipt is displayed. Defaulttrue
.give_receipt_status_notice
filter allows users to filter the notice.How Has This Been Tested?
Screenshots (jpeg or gifs if applicable):
Types of changes
Resolves #509
Checklist:
Documentation Updates
@mathetos We will need to update https://givewp.com/documentation/core/shortcodes/give_receipt/ with the following changes:
[give_receipt]
shortcode attributes.give_receipt_status_notice
filter with examples.New Filter:
give_receipt_status_notice
Basic Example
Customize an error notice based on donation status.
Advanced Example
Personalize a success notice with the donor's first name. This is possible because we are passing
$meta
to the hooked function.