Last active
April 9, 2021 23:25
-
-
Save matheuswd/be8088a0755ff335d25dfe6e406ab0ff to your computer and use it in GitHub Desktop.
Outputs all post meta for a payment in GiveWP
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* TESTING: Outputs all post meta | |
* | |
* This section outputs all the custom fields for your reference | |
* Just set the $testing variable to true | |
*/ | |
$testing = true; | |
if ( $testing == true ) { | |
$testquery = new Give_Payments_Query( array( 'number' => 1 ) ); | |
$payments = $testquery->get_payments(); | |
if ( $payments ) { | |
foreach ( $payments as $payment ) { | |
$meta = give_get_meta( $payment->ID ); | |
?> | |
<div style="background: #555;color: white;padding: 2rem"> | |
<h3>Test Data</h3> | |
<p>The following outputs all the "give_payment" fields for you to reference in building out your donation list</p> | |
<pre> | |
<?php print_r($meta) ?> | |
</pre> | |
</div> | |
<?php | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment