@@ 530-539 (lines=10) @@ | ||
527 | return $invoice->get_transaction_id(); |
|
528 | } |
|
529 | ||
530 | function wpinv_get_id_by_transaction_id( $key ) { |
|
531 | global $wpdb; |
|
532 | ||
533 | $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 ) ); |
|
534 | ||
535 | if ( $invoice_id != NULL ) |
|
536 | return $invoice_id; |
|
537 | ||
538 | return 0; |
|
539 | } |
|
540 | ||
541 | function wpinv_get_invoice_meta( $invoice_id = 0, $meta_key = '_wpinv_payment_meta', $single = true ) { |
|
542 | $invoice = new WPInv_Invoice( $invoice_id ); |
|
@@ 1867-1876 (lines=10) @@ | ||
1864 | return $display; |
|
1865 | } |
|
1866 | ||
1867 | function wpinv_get_invoice_id_by_key( $key ) { |
|
1868 | global $wpdb; |
|
1869 | ||
1870 | $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 ) ); |
|
1871 | ||
1872 | if ( $invoice_id != NULL ) |
|
1873 | return $invoice_id; |
|
1874 | ||
1875 | return 0; |
|
1876 | } |
|
1877 | ||
1878 | function wpinv_can_view_receipt( $invoice_key = '' ) { |
|
1879 | $return = false; |