I am trying to display a users subscribed product ID once they have logged in.. But only if the subsciption is Pending. Eg. Hi User, You have ordered {ordered subsciption}. Your payment of {subsciption cost} is outstanding. Please make payment as soon as possible. I can't seem to get it working though If I use this in php: print_r($_SESSION['_amember_product_ids']); All I get is "Array ( )" .. Unless the user has paid for their subsciption. Could someone please help me display the id of a pending subscription?
That array will not work because it will contain only active subscriptions. You need to query amember_payments table: $db->query("select * from amember_payments where member_id=$member_id and completed=0");