Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 5 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
||
| 1 | <?php |
| 2 | /** |
| 3 | * Template to display in emails to customers. |
| 4 | * |
| 5 | * @see \BrianHenryIE\WP_Bitcoin_Gateway\API_Interface::get_order_details() |
| 6 | * |
| 7 | * @var array<string, mixed> $args Associative array containing the result of `API_Interface::get_formatted_order_details()`, extracted into these variables: |
| 8 | * |
| 9 | * @var string $payment_status 'Awaiting Payment'|'Partially Paid'|'Paid'. |
| 10 | * @var string $btc_address Destination payment address. |
| 11 | * @var string $btc_total Order total in BTC. |
| 12 | * @var string $btc_total_formatted Order total prefixed with "฿". |
| 13 | * @var string $btc_exchange_rate_formatted The Bitcoin exchange rate with friendly thousand separators. |
| 14 | * @var string $btc_amount_received Amount received at the destination address so far. |
| 15 | * @var string $btc_amount_received_formatted Amount received prefixed with "฿". |
| 16 | * @var WC_Order $order The order that Bitcoin is being used to pay. |
| 17 | * |
| 18 | * @var string $exchange_rate_url |
| 19 | * @var string $btc_exchange_rate_formatted |
| 20 | * |
| 21 | * @package brianhenryie/bh-wp-bitcoin-gateway |
| 22 | */ |
| 23 | |
| 24 | $btc_exchange_rate_formatted = wp_strip_all_tags( $btc_exchange_rate_formatted ); |
| 25 | |
| 26 | if ( ! $order->is_paid() ) : |
| 27 | |
| 28 | $bitcoin_href_address = 'bitcoin:' . $btc_address . '?amount=' . $btc_total; |
| 29 | |
| 30 | ?> |
| 31 | |
| 32 | <p>Bitcoin price: <b><?php echo esc_html( $btc_total_formatted ); ?></b> (1 BTC = <?php echo esc_html( $btc_exchange_rate_formatted ); ?>).</p> |
| 33 | |
| 34 | <p>Payment Address: <a target="_blank" href="<?php echo esc_url( $bitcoin_href_address, array( 'bitcoin' ) ); ?>"><?php echo esc_html( $btc_address ); ?></a></p> |
| 35 | |
| 36 | <?php |
| 37 | endif; |