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_default()

Retrieve the default checkout settings for the main section


Return Return

(array)


Top ↑

Source Source

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

	private function get_settings_default() {

		$currency_code_options = get_lifterlms_currencies();
		foreach ( $currency_code_options as $code => $name ) {
			$currency_code_options[ $code ] = $name . ' (' . get_lifterlms_currency_symbol( $code ) . ')';
		}

		$country_options = get_lifterlms_countries();
		foreach ( $country_options as $code => $name ) {
			$country_options[ $code ] = $name . ' (' . $code . ')';
		}

		return array(

			array(
				'class' => 'top',
				'id'    => 'course_archive_options',
				'type'  => 'sectionstart',
			),

			array(
				'id'    => 'course_options',
				'title' => __( 'Checkout Settings', 'lifterlms' ),
				'type'  => 'title',
			),

			array(
				'title'             => __( 'Checkout Page', 'lifterlms' ),
				'desc'              => __( 'Page used for displaying the checkout form.', 'lifterlms' ),
				'id'                => 'lifterlms_checkout_page_id',
				'type'              => 'select',
				'default'           => '',
				'class'             => 'llms-select2-post',
				'custom_attributes' => array(
					'data-post-type' => 'page',
				),
				'options'           => llms_make_select2_post_array( get_option( 'lifterlms_checkout_page_id', '' ) ),
			),

			array(
				'title'    => __( 'Confirm Payment', 'lifterlms' ),
				'desc'     => __( 'Payment confirmation endpoint slug', 'lifterlms' ),
				'id'       => 'lifterlms_myaccount_confirm_payment_endpoint',
				'type'     => 'text',
				'default'  => 'confirm-payment',
				'desc_tip' => true,
				'sanitize' => 'slug',
			),

			array(
				'title'   => __( 'Force SSL', 'lifterlms' ),
				'desc'    => __( 'Force secure checkout via SSL (https) on the checkout page(s).', 'lifterlms' ) .
								'<p class="description">' . sprintf( __( 'Requires an SSL certificate. %1$sLearn More%2$s', 'lifterlms' ), '<a href="https://lifterlms.com/docs/ssl-and-https/" target="_blank">', '</a>' ) . '</p>',
				'id'      => 'lifterlms_checkout_force_ssl',
				'type'    => 'checkbox',
				'default' => 'no',
			),

			array(
				'default' => 'yes',
				'desc'    => __( 'Enable automatic retry of failed recurring payments.', 'lifterlms' ) .
							  '<p class="description">' . sprintf( __( 'Recover lost revenue from temporarily declined payment methods. %1$sLearn More%2$s', 'lifterlms' ), '<a href="https://lifterlms.com/docs/automatic-retry-failed-payments/" target="_blank">', '</a>' ) . '</p>',
				'id'      => 'lifterlms_recurring_payment_retry',
				'title'   => __( 'Retry Failed Payments', 'lifterlms' ),
				'type'    => 'checkbox',
			),

			array(
				'type' => 'sectionend',
				'id'   => 'course_archive_options',
			),

			array(
				'type' => 'sectionstart',
				'id'   => 'general_options',
			),

			array(
				'title' => __( 'Currency Options', 'lifterlms' ),
				'type'  => 'title',
				'desc'  => __( 'The following options affect how prices are displayed on the frontend.', 'lifterlms' ),
				'id'    => 'pricing_options',
			),

			array(
				'class'    => 'llms-select2',
				'title'    => __( 'Country', 'lifterlms' ),
				'desc'     => __( 'Select the country LifterLMS should use as the default during transactions and registrations.', 'lifterlms' ),
				'id'       => 'lifterlms_country',
				'default'  => 'US',
				'type'     => 'select',
				'desc_tip' => false,
				'options'  => $country_options,
			),

			array(
				'class'    => 'llms-select2',
				'title'    => __( 'Currency', 'lifterlms' ),
				'desc'     => __( 'Select the currency LifterLMS should use to display prices and process transactions.', 'lifterlms' ),
				'id'       => 'lifterlms_currency',
				'default'  => 'USD',
				'type'     => 'select',
				'desc_tip' => false,
				'options'  => $currency_code_options,
			),

			array(
				'title'   => __( 'Currency Position', 'lifterlms' ),
				'desc'    => __( 'Customize the position and formatting of the currency symbol for displayed prices.', 'lifterlms' ),
				'id'      => 'lifterlms_currency_position',
				'default' => 'left',
				'type'    => 'select',
				'options' => array(
					'left'        => 'Left (' . sprintf( '%1$s%2$s', get_lifterlms_currency_symbol(), 99.99 ) . ')',
					'right'       => 'Right (' . sprintf( '%2$s%1$s', get_lifterlms_currency_symbol(), 99.99 ) . ')',
					'left_space'  => 'Left with Space (' . sprintf( '%1$s&nbsp;%2$s', get_lifterlms_currency_symbol(), 99.99 ) . ')',
					'right_space' => 'Right with Space (' . sprintf( '%2$s&nbsp;%1$s', get_lifterlms_currency_symbol(), 99.99 ) . ')',
				),
			),

			array(
				'title'   => __( 'Thousand Separator', 'lifterlms' ),
				'class'   => 'tiny',
				'desc'    => __( 'Choose the character to display as the thousand\'s place separator for displayed prices.', 'lifterlms' ),
				'id'      => 'lifterlms_thousand_separator',
				'type'    => 'text',
				'default' => ',',
			),

			array(
				'title'   => __( 'Decimal Separator', 'lifterlms' ),
				'class'   => 'tiny',
				'desc'    => __( 'Choose the character to display as the decimal separator for displayed prices.', 'lifterlms' ),
				'id'      => 'lifterlms_decimal_separator',
				'type'    => 'text',
				'default' => '.',
			),

			array(
				'title'   => __( 'Decimal Places', 'lifterlms' ),
				'class'   => 'tiny',
				'desc'    => __( 'Customize the number of decimal places for prices.', 'lifterlms' ),
				'id'      => 'lifterlms_decimals',
				'type'    => 'number',
				'default' => '2',
			),

			array(
				'title'   => __( 'Hide Zero Decimals', 'lifterlms' ),
				'desc'    => __( 'Automatically remove zero decimals from the end of displayed prices.', 'lifterlms' ),
				'id'      => 'lifterlms_trim_zero_decimals',
				'default' => 'no',
				'type'    => 'checkbox',
			),

			array(
				'type' => 'sectionend',
				'id'   => 'general_options',
			),

			array(
				'type' => 'sectionstart',
				'id'   => 'checkout_settings_gateways_list_start',
			),

			array(
				'title' => __( 'Payment Gateways', 'lifterlms' ),
				'type'  => 'title',
				'id'    => 'checkout_settings_gateways_list_title',
			),

			array(
				'value' => $this->get_gateway_table_html(),
				'type'  => 'custom-html',
			),

			array(
				'type' => 'sectionend',
				'id'   => 'checkout_settings_gateways_list_end',
			),

		);

	}



Top ↑

Changelog Changelog

Changelog
Version Description
3.30.3 Fixed spelling errors.
3.17.5 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

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