Created
September 18, 2025 17:17
-
-
Save rickalday/90246e22d9d3d99d44fef56dc65f4805 to your computer and use it in GitHub Desktop.
Log GiveWP donation data in Donations -> Tools -> Logs.
This file contains hidden or 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
| <?php | |
| /** | |
| * Log donation data in Donations -> Tools -> Logs. | |
| * | |
| * @param int $payment_id The ID of the inserted payment. | |
| * @param array $payment_data The payment data array, which includes payment_meta. | |
| */ | |
| function log_givewp_payment_meta( $payment_id, $payment_data ) { | |
| \Give\Framework\PaymentGateways\Log\PaymentGatewayLog::info('Donation Data', | |
| [ | |
| 'Donation ID' => $payment_id, | |
| 'Donation Data' => $payment_data, | |
| ] | |
| ); | |
| } | |
| add_action( 'give_insert_payment', 'log_givewp_payment_meta', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment