Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.

LLMS_Controller_Orders::validate_selected_gateway( string $gateway_id, LLMS_Access_Plan $plan )

Validate a gateway can be used to process the current action / transaction


Parameters Parameters

$gateway_id

(string) (Required) Gateway's id.

$plan

(LLMS_Access_Plan) (Required) Instance of the LLMS_Access_Plan related to the action/transaction.


Top ↑

Return Return

(WP_Error|LLMS_Payment_Gateway) WP_Error or LLMS_Payment_Gateway subclass.


Top ↑

Source Source

File: includes/controllers/class.llms.controller.orders.php

	}

	/**
	 * When a transaction fails, update the parent order's status.
	 *
	 * @since 3.0.0
	 * @since 3.10.0 Unknown.
	 *
	 * @param LLMS_Transaction $txn Instance of the LLMS_Transaction.
	 * @return void
	 */
	public function transaction_failed( $txn ) {

		$order = $txn->get_order();

		// Halt if legacy.
		if ( $order->is_legacy() ) {
			return; }

		if ( $order->can_be_retried() ) {

			$order->maybe_schedule_retry();

		} else {

			$order->set( 'status', 'llms-failed' );

		}

	}

	/**


Top ↑

Changelog Changelog

Changelog
Version Description
3.10.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.