LLMS_Payment_Gateways::__construct()
Constructor.
Return Return
(void)
Source Source
File: includes/class.llms.payment.gateways.php
public function __construct() {
add_filter( 'lifterlms_payment_gateways', array( $this, 'add_core_gateways' ) );
/**
* Filters the list of registered LifterLMS Payment Gateway classes.
*
* @since 3.0.0
*
* @param string[] $gateways Array of payment gateway class names.
*/
$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 );
}
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
| Version | Description |
|---|---|
| 3.0.0 | Introduced. |