LLMS_Controller_Orders::transaction_succeeded( obj $txn )
When a transaction succeeds, update the parent order’s status
Description Description
Parameters Parameters
- $txn
-
(obj) (Required) Instance of the LLMS_Transaction
Return Return
(void)
Source Source
File: includes/controllers/class.llms.controller.orders.php
public function transaction_succeeded( $txn ) { // get the order $order = $txn->get_order(); // halt if legacy if ( $order->is_legacy() ) { return; } // update the status based on the order type $status = $order->is_recurring() ? 'llms-active' : 'llms-completed'; $order->set( 'status', $status ); $order->set( 'last_retry_rule', '' ); // retries should always start with tne first rule for new transactions // maybe schedule a payment $order->maybe_schedule_payment(); }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
User Contributed Notes User Contributed Notes
Permalink: