|
@@ 535-544 (lines=10) @@
|
| 532 |
|
return $invoice->get_transaction_id(); |
| 533 |
|
} |
| 534 |
|
|
| 535 |
|
function wpinv_get_id_by_transaction_id( $key ) { |
| 536 |
|
global $wpdb; |
| 537 |
|
|
| 538 |
|
$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 ) ); |
| 539 |
|
|
| 540 |
|
if ( $invoice_id != NULL ) |
| 541 |
|
return $invoice_id; |
| 542 |
|
|
| 543 |
|
return 0; |
| 544 |
|
} |
| 545 |
|
|
| 546 |
|
function wpinv_get_invoice_meta( $invoice_id = 0, $meta_key = '_wpinv_payment_meta', $single = true ) { |
| 547 |
|
$invoice = new WPInv_Invoice( $invoice_id ); |
|
@@ 1882-1891 (lines=10) @@
|
| 1879 |
|
return $display; |
| 1880 |
|
} |
| 1881 |
|
|
| 1882 |
|
function wpinv_get_invoice_id_by_key( $key ) { |
| 1883 |
|
global $wpdb; |
| 1884 |
|
|
| 1885 |
|
$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 ) ); |
| 1886 |
|
|
| 1887 |
|
if ( $invoice_id != NULL ) |
| 1888 |
|
return $invoice_id; |
| 1889 |
|
|
| 1890 |
|
return 0; |
| 1891 |
|
} |
| 1892 |
|
|
| 1893 |
|
function wpinv_can_view_receipt( $invoice_key = '' ) { |
| 1894 |
|
$return = false; |