Hi I am working on a customization for Amember and have been trying to figure out the best way to get the new rebill date after a user renews their product. I tried the invoiceAfterInsert hook but it seems that the rebill date is not present in the invoice array at this time I also tried to pull it out of the database but its not in there either. Then I thought maybe about using the accessAfterInsert hook but then I do not have the cooresponding ivoice id. Can someone lead me in the right direction to get the new rebill date after a user pays to renew their product. I need to get the new rebill date and do some custom command based on it. Thanks for any assistance with this. Have a great day!
Here is code that you can use: Code: Am_Di::getInstance()->hook->add(Am_Event::PAYMENT_WITH_ACCESS_AFTER_INSERT, function(Am_Event $e){ $e->getInvoice()->rebill_date; });