Astra_Edd_Checkout_Configs::register_configuration( Array $configurations, WP_Customize_Manager $wp_customize )

Register Easy Digital Downloads Checkout Layout Configurations.


Description


Parameters

$configurations

(Array) (Required) Astra Customizer Configurations.

$wp_customize

(WP_Customize_Manager) (Required) instance of WP_Customize_Manager.


Return

(Array) Astra Customizer Configurations with updated configurations.


Source

File: addons/edd/classes/sections/class-astra-edd-checkout-configs.php

		public function register_configuration( $configurations, $wp_customize ) {

			$_configs = array(

				/**
				 * Option: Display Coupon on Checkout Page
				 */
				array(
					'name'    => ASTRA_THEME_SETTINGS . '[edd-checkout-coupon-display]',
					'default' => astra_get_option( 'edd-checkout-coupon-display' ),
					'type'    => 'control',
					'section' => 'section-edd-checkout-page',
					'title'   => __( 'Display Apply Coupon Field', 'astra-addon' ),
					'control' => Astra_Theme_Extension::$switch_control,
					'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
				),

				/*
				 * Option: Distraction free Checkout.
				 */
				array(
					'name'    => ASTRA_THEME_SETTINGS . '[edd-distraction-free-checkout]',
					'default' => astra_get_option( 'edd-distraction-free-checkout' ),
					'type'    => 'control',
					'section' => 'section-edd-checkout-page',
					'title'   => __( 'Distraction Free Checkout', 'astra-addon' ),
					'control' => Astra_Theme_Extension::$switch_control,
					'divider' => array( 'ast_class' => 'ast-bottom-divider' ),
				),

				/**
				 * Option: Checkout Content Width
				 */
				array(
					'name'      => ASTRA_THEME_SETTINGS . '[edd-checkout-content-width]',
					'default'   => astra_get_option( 'edd-checkout-content-width' ),
					'type'      => 'control',
					'control'   => 'ast-select',
					'section'   => 'section-edd-checkout-page',
					'transport' => 'postMessage',
					'title'     => __( 'Checkout Form Width', 'astra-addon' ),
					'choices'   => array(
						'default' => __( 'Default', 'astra-addon' ),
						'custom'  => __( 'Custom', 'astra-addon' ),
					),
				),

				/**
				 * Option: Enter Width
				 */
				array(
					'name'        => ASTRA_THEME_SETTINGS . '[edd-checkout-content-max-width]',
					'default'     => astra_get_option( 'edd-checkout-content-max-width' ),
					'type'        => 'control',
					'transport'   => 'postMessage',
					'control'     => 'ast-slider',
					'context'     => array(
						astra_addon_builder_helper()->general_tab_config,
						array(
							'setting'  => ASTRA_THEME_SETTINGS . '[edd-checkout-content-width]',
							'operator' => '==',
							'value'    => 'custom',
						),
					),
					'section'     => 'section-edd-checkout-page',
					'title'       => __( 'Custom Width', 'astra-addon' ),
					'suffix'      => 'px',
					'input_attrs' => array(
						'min'  => 768,
						'step' => 1,
						'max'  => 1920,
					),
				),
			);

			$configurations = array_merge( $configurations, $_configs );

			return $configurations;

		}

Changelog

Changelog
Version Description
1.6.10 Introduced.


User Contributed Notes

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