user_email ) { return false; } $subject = sprintf( /* translators: %s: receipt number */ __( 'Payment receipt %s', 'unsupervised-schedular' ), (string) $payment->receiptNumber ); if ( $payment->taxAmount > 0 ) { $body = sprintf( /* translators: 1: currency, 2: subtotal, 3: HST rate, 4: HST amount, 5: total, 6: receipt number */ __( "Thank you. We have recorded your payment.\n\nSubtotal: %1\$s %2\$s\nHST (%3\$s%%): %1\$s %4\$s\nTotal: %1\$s %5\$s\n\nReceipt: %6\$s", 'unsupervised-schedular' ), $payment->currency, number_format( $payment->amount, 2 ), number_format( $payment->taxRate, 2 ), number_format( $payment->taxAmount, 2 ), number_format( $payment->total(), 2 ), (string) $payment->receiptNumber ); } else { $body = sprintf( /* translators: 1: amount, 2: currency, 3: receipt number */ __( "Thank you. We have recorded your payment of %1\$s %2\$s.\n\nReceipt: %3\$s", 'unsupervised-schedular' ), number_format( $payment->total(), 2 ), $payment->currency, (string) $payment->receiptNumber ); } return (bool) wp_mail( $student->user_email, $subject, $body ); } }