@@ 538-547 (lines=10) @@ | ||
535 | return $invoice->get_transaction_id(); |
|
536 | } |
|
537 | ||
538 | function wpinv_get_id_by_transaction_id( $key ) { |
|
539 | global $wpdb; |
|
540 | ||
541 | $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 ) ); |
|
542 | ||
543 | if ( $invoice_id != NULL ) |
|
544 | return $invoice_id; |
|
545 | ||
546 | return 0; |
|
547 | } |
|
548 | ||
549 | function wpinv_get_invoice_meta( $invoice_id = 0, $meta_key = '_wpinv_payment_meta', $single = true ) { |
|
550 | $invoice = new WPInv_Invoice( $invoice_id ); |
|
@@ 1851-1860 (lines=10) @@ | ||
1848 | return $display; |
|
1849 | } |
|
1850 | ||
1851 | function wpinv_get_invoice_id_by_key( $key ) { |
|
1852 | global $wpdb; |
|
1853 | ||
1854 | $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 ) ); |
|
1855 | ||
1856 | if ( $invoice_id != NULL ) |
|
1857 | return $invoice_id; |
|
1858 | ||
1859 | return 0; |
|
1860 | } |
|
1861 | ||
1862 | function wpinv_can_view_receipt( $invoice_key = '' ) { |
|
1863 | $return = false; |