Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Created November 26, 2020 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dryan1144/94f04a641bd5729649cb02e017deb241 to your computer and use it in GitHub Desktop.
Save dryan1144/94f04a641bd5729649cb02e017deb241 to your computer and use it in GitHub Desktop.
<?php
function drw_purchase_confirmation_text( $payment, $edd_receipt_args ) {
$payment = new EDD_Payment($payment->ID);
$downloads = $payment->downloads;
$gateway = $payment->gateway; //stripe //check
$gateway_text = ( 'stripe' == $gateway ) ? __('Credit Card', 'drw') : __('Check', 'drw');
printf('<div class="message">%s %s</div>', __('You have paid by'), $gateway_text);
}
add_action('edd_payment_receipt_before', 'drw_purchase_confirmation_text', 10, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment