You appear to be a bot. Output may be restricted
Description
Constructor.
Usage
$mixed = EDD_Payment::__construct( $payment_or_txn_id, $by_txn );
Parameters
- $payment_or_txn_id
- ( mixed ) optional – Payment ID or transaction ID. Default false.
- $by_txn
- ( bool ) optional – Whether the constructor should retrieve the order ID from the transaction ID. Default false.
Returns
mixed void|false
Source
File name: easy-digital-downloads/includes/payments/class-edd-payment.php
Lines:
1 to 17 of 17
public function __construct( $payment_or_txn_id = false, $by_txn = false ) { if ( empty( $payment_or_txn_id ) ) { return false; } if ( $by_txn ) { $payment_id = edd_get_order_id_from_transaction_id( $payment_or_txn_id ); if ( empty( $payment_id ) ) { return false; } } else { $payment_id = absint( $payment_or_txn_id ); } $this->setup_payment( $payment_id ); }