LLMS_Payment_Gateways::__construct()

Constructor


Description Description


Source Source

File: includes/class.llms.payment.gateways.php

	public function __construct() {

		add_filter( 'lifterlms_payment_gateways', array( $this, 'add_core_gateways' ) );

		$gateways = apply_filters( 'lifterlms_payment_gateways', $this->payment_gateways );

		foreach ( $gateways as $gateway ) {

			$load_gateway = new $gateway();

			$order = absint( $load_gateway->get_display_order() );

			// if the order already exists create a new order for it
			if ( isset( $this->payment_gateways[ $order ] ) ) {

				$order = max( array_keys( $this->payment_gateways ) ) + 1;

			}

			$this->payment_gateways[ $order ] = $load_gateway;
		}

		ksort( $this->payment_gateways );

	}


Top ↑

User Contributed Notes User Contributed Notes

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