• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer
Easy Digital Downloads a2z

Easy Digital Downloads a2z

Easy Digital Downloads a2z

  • Home
  • Plugins
  • Shortcodes
  • APIs
  • Classes
  • Files
  • Hooks
  • Sitemap
  • Blog
Home / APIs / EDD_Payment::__construct() – Constructor.

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 );
  }
 

 View on GitHub View on Trac

Published: 26th November 2019 | Last updated: 15th September 2022

Primary Sidebar

Information

Function name: EDD_Payment::__construct
Class ref: EDD_Payment
Plugin ref: Easy Digital Downloads
Version: 3.1.0.2
Sourcefile: includes/payments/class-edd-payment.php
File ref: includes/payments/class-edd-payment.php
Deprecated?: No
API Letters: C,E,P

Footer

Easy Digital Downloads a2z
Easy Digital Downloads a2z
Easy Digital Downloads a2z
WordPress 6.1.1
WordPress a2z
WordPress core a2z
Genesis Theme Framework a2z
Jetpack a2z
WordPress develop tests
Easy Digital Downloads a2z
WooCommerce a2z
Yoast SEO a2z
WordPress Blocks

Site:  edd.wp-a2z.org
© Copyright Easy Digital Downloads a2z 2014-2023. All rights reserved.


Website designed and developed by Herb Miller
Proudly powered by WordPress and oik plugins