LLMS_Payment_Gateway::can_process_access_plan( LLMS_Access_Plan $plan, LLMS_Order $order = null )

Determine if an access plan can be processed by the gateway.


Parameters Parameters

$plan

(LLMS_Access_Plan) (Required) Instance of an LLMS_Access_Plan.

$order

(LLMS_Order) (Optional) Instance of an LLMS_Order. Used to check whether a payment can be switched using this gateway.<br> In that case, in fact, we have to rely on the access plan information contained in the order at the moment of its creation.

Default value: null


Top ↑

Return Return

(boolean)


Top ↑

Source Source

File: includes/abstracts/abstract.llms.payment.gateway.php

	public function can_process_access_plan( $plan, $order = null ) {
		/**
		 * Filters whether or not a gateway can process a specific access plan.
		 *
		 * @since 7.5.0
		 *
		 * @param bool             $can_process_plan Whether or not the gateway can process a specific access plan.
		 * @param LLMS_Access_Plan $plan             Access plan object.
		 * @param LLMS_Order       $plan             Order object.
		 * @param string           $id               The gateway ID.
		 */
		return apply_filters( 'llms_can_gateway_process_access_plan', $plan || $order, $plan, $order, $this->id );
	}


Top ↑

Changelog Changelog

Changelog
Version Description
7.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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