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_Settings_Checkout::get_settings_gateway( string $curr_section )

Retrieve settings for a gateway section


Parameters Parameters

$curr_section

(string) (Required) gateway ID string


Top ↑

Return Return

(array)


Top ↑

Source Source

File: includes/admin/settings/class.llms.settings.checkout.php

		$settings = array();

		$settings[] = array(
			'type'  => 'sectionstart',
			'id'    => 'start_gateway_settings_' . $curr_section,
			'class' => 'top',
		);

		$gateway = llms()->payment_gateways()->get_gateway_by_id( $curr_section );
		if ( ! $gateway ) {

			$settings[] = array(
				'title' => __( 'Payment Gateway Settings', 'lifterlms' ),
				'type'  => 'title',
				'id'    => 'title_gateway_settings_' . $curr_section,
			);

			$settings[] = array(
				'title' => sprintf( __( 'Error: "%s" is not a valid payment gateway', 'lifterlms' ), $curr_section ),
				'type'  => 'subtitle',
				'id'    => 'title_gateway_settings_' . $curr_section,
			);

		} else {

			$settings[] = array(
				'title' => sprintf( __( '%s Payment Gateway Settings', 'lifterlms' ), $gateway->get_admin_title() ),
				'type'  => 'title',
				'id'    => 'title_gateway_settings_' . $curr_section,
			);

			$settings = array_merge( $settings, $gateway->get_admin_settings_fields() );

		}

		$settings[] = array(
			'type' => 'sectionend',
			'id'   => 'end_gateway_settings_' . $curr_section,
		);

		return $settings;

	}



Top ↑

Changelog Changelog

Changelog
Version Description
3.17.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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