The [donation_history] shortcode displays the current user’s complete donation history as well as receipts for each instance

GiveWP creates a new page called “Donation History” with this shortcode inserted into the content editor upon install. See the documentation on updating the “Donation History” page here. This shortcode does not currently have a block,but it has customizable arguments. For developers, the Donation History template can be customized as needed.

Why use the Donation History Shortcode?

The [donation_history] shortcode on a page provides your logged-in or email-authenticated donors with a place to view their donation history and view individual receipts.

When this page is added, it allows your donors to check their donations, the payment info, and if you are using the PDF Receipts add-on, for example, it allows your donors to (re)download their receipts.

The default Donation History shortcode

[donation_history]

The default shortcode will output a donation history table like shown here:

screenshot showing the donation history page using the 	<div class="give-form">
		<form method="post" id="give-email-access-form">
			<p>
				Please verify your email to access your donation history.			</p>

			<label for="give-email">Donation Email:</label>
			<input id="give-email" type="email" name="give_email" value=""
					placeholder="Email Address"/>
			<input type="hidden" name="_wpnonce" value="f5874262e7"/>
			<input type="hidden" name="give_action" value="email_access_form_login"/>
			<input type="hidden" name="give_access_page" value="1729"/>

			
			<input type="submit" class="give-submit" value="Verify Email"/>
		</form>
	</div>
	 shortcode without parameters defined by the user

Using the Shortcode Builder

The [donation_history] shortcode is available within the Shortcode Builder, but no arguments are exposed in the builder. Simply choose “Donation History” from the list, then “Insert Shortcode” and it will be inserted into the page for you.

Shortcode Usage

The following arguments are available to use in conjunction with the [donation_history] shortcode:

  • id => true/false (default is “true”). Show or hide the donation “ID” column.
  • date => true/false (default is “true”). Show or hide the date the donation was made as a column.
  • donor => true/false (default is “false”). Show or hide a column with the donor’s full name.
  • amount => true/false (default is “true). Show or hide a column with the donation amount.
  • status => true/false (default is “false”). Show or hide a column reflecting the payment status of the donation.
  • payment_method => true/false (default is “false”). Show or hide a column reflecting the payment gateway name the donation was made with.

Moving the Donation History Page

Most likely you won’t ever have to move or edit this shortcode. However, if you do need to switch the shortcode to another page simply insert it the code into any page and update the “Donation History Page” setting found under Give > Settings > General:

A User's Donation History
A User’s Donation History

This shortcode is required to be on a WordPress page (not post) and the page must be set appropriately under Give > Settings > General.