Astra_SureCart::astra_surecart_default_options( array $defaults )

Astra SureCart default options.


Description


Parameters

$defaults

(array) (Required) Array of Astra's options.


Return

(array) Filtered options array.


Source

File: inc/compatibility/surecart/class-astra-surecart.php

	public function astra_surecart_default_options( $defaults ) {
		$surecart_post_types = array( 'sc_product', 'sc_collection', 'sc_upsell' );

		// Remove the default left and right padding to make it align properly.
		$surecart_banner_padding = Astra_Posts_Structure_Loader::get_customizer_default( 'responsive-padding' );
		if ( isset( $surecart_banner_padding['desktop']['right'] ) ) {
			$surecart_banner_padding['desktop']['right'] = 0;
		}
		if ( isset( $surecart_banner_padding['desktop']['left'] ) ) {
			$surecart_banner_padding['desktop']['left'] = 0;
		}

		foreach ( $surecart_post_types as $post_type ) {
			$defaults['ast-archive-' . $post_type . '-title']         = false;
			$defaults['ast-single-' . $post_type . '-title']          = false;
			$defaults['single-' . $post_type . '-ast-content-layout'] = 'normal-width-container';
			$defaults['single-' . $post_type . '-sidebar-layout']     = 'no-sidebar';
			$defaults['ast-dynamic-archive-' . $post_type . '-banner-padding'] = $surecart_banner_padding;
		}
		return $defaults;
	}

Changelog

Changelog
Version Description
4.7.3 Introduced.


User Contributed Notes

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