|
@@ 81-90 (lines=10) @@
|
| 78 |
|
return $invoice->get_transaction_id(); |
| 79 |
|
} |
| 80 |
|
|
| 81 |
|
function wpinv_get_id_by_transaction_id( $key ) { |
| 82 |
|
global $wpdb; |
| 83 |
|
|
| 84 |
|
$invoice_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wpinv_transaction_id' AND meta_value = %s LIMIT 1", $key ) ); |
| 85 |
|
|
| 86 |
|
if ( $invoice_id != NULL ) |
| 87 |
|
return $invoice_id; |
| 88 |
|
|
| 89 |
|
return 0; |
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
function wpinv_get_invoice_meta( $invoice_id = 0, $meta_key = '_wpinv_payment_meta', $single = true ) { |
| 93 |
|
$invoice = new WPInv_Invoice( $invoice_id ); |
|
@@ 1383-1392 (lines=10) @@
|
| 1380 |
|
return $display; |
| 1381 |
|
} |
| 1382 |
|
|
| 1383 |
|
function wpinv_get_invoice_id_by_key( $key ) { |
| 1384 |
|
global $wpdb; |
| 1385 |
|
|
| 1386 |
|
$invoice_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM $wpdb->postmeta WHERE meta_key = '_wpinv_key' AND meta_value = %s LIMIT 1", $key ) ); |
| 1387 |
|
|
| 1388 |
|
if ( $invoice_id != NULL ) |
| 1389 |
|
return $invoice_id; |
| 1390 |
|
|
| 1391 |
|
return 0; |
| 1392 |
|
} |
| 1393 |
|
|
| 1394 |
|
function wpinv_can_view_receipt( $invoice_key = '' ) { |
| 1395 |
|
$return = false; |