|
@@ 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 ); |
|
@@ 1608-1617 (lines=10) @@
|
| 1605 |
|
return $display; |
| 1606 |
|
} |
| 1607 |
|
|
| 1608 |
|
function wpinv_get_invoice_id_by_key( $key ) { |
| 1609 |
|
global $wpdb; |
| 1610 |
|
|
| 1611 |
|
$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 ) ); |
| 1612 |
|
|
| 1613 |
|
if ( $invoice_id != NULL ) |
| 1614 |
|
return $invoice_id; |
| 1615 |
|
|
| 1616 |
|
return 0; |
| 1617 |
|
} |
| 1618 |
|
|
| 1619 |
|
function wpinv_can_view_receipt( $invoice_key = '' ) { |
| 1620 |
|
$return = false; |