|
@@ 309-318 (lines=10) @@
|
| 306 |
|
return $invoice->get_transaction_id(); |
| 307 |
|
} |
| 308 |
|
|
| 309 |
|
function wpinv_get_id_by_transaction_id( $key ) { |
| 310 |
|
global $wpdb; |
| 311 |
|
|
| 312 |
|
$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 ) ); |
| 313 |
|
|
| 314 |
|
if ( $invoice_id != NULL ) |
| 315 |
|
return $invoice_id; |
| 316 |
|
|
| 317 |
|
return 0; |
| 318 |
|
} |
| 319 |
|
|
| 320 |
|
function wpinv_get_invoice_meta( $invoice_id = 0, $meta_key = '_wpinv_payment_meta', $single = true ) { |
| 321 |
|
$invoice = new WPInv_Invoice( $invoice_id ); |
|
@@ 1622-1631 (lines=10) @@
|
| 1619 |
|
return $display; |
| 1620 |
|
} |
| 1621 |
|
|
| 1622 |
|
function wpinv_get_invoice_id_by_key( $key ) { |
| 1623 |
|
global $wpdb; |
| 1624 |
|
|
| 1625 |
|
$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 ) ); |
| 1626 |
|
|
| 1627 |
|
if ( $invoice_id != NULL ) |
| 1628 |
|
return $invoice_id; |
| 1629 |
|
|
| 1630 |
|
return 0; |
| 1631 |
|
} |
| 1632 |
|
|
| 1633 |
|
function wpinv_can_view_receipt( $invoice_key = '' ) { |
| 1634 |
|
$return = false; |