Extract Active Subscription Quantity

Discussion in 'Customization & add-ons' started by natesreich, May 1, 2019.

  1. natesreich

    natesreich New Member

    Joined:
    Sep 21, 2016
    Messages:
    2
    Hello,

    How can I get the quantity of a user's active subscription?

    The closest thing I have found is:

    Code:
    $invoices = Am_Di::getInstance()->invoiceTable->findByUserId($user_id);
    foreach ($invoices as $invoice) {
        var_dump($invoice->first_total);
    }
    And then, I can calculate the quantity based on the total price.

    Surely there must be a better way though.

Share This Page