ASTRA_Ext_Edd_Markup::customization_checkout_page()

Checkout page markup update using actions & filters only


Description


Source

File: addons/edd/classes/class-astra-ext-edd-markup.php

		public function customization_checkout_page() {

			if ( ! edd_is_checkout() ) {
				return;
			}

			// Display coupon.
			if ( ! astra_get_option( 'edd-checkout-coupon-display' ) ) {
				remove_action( 'edd_before_purchase_form', 'edd_discount_field', -1 );
				remove_action( 'edd_before_purchase_form', 'edd_agree_to_terms_js' );
			}

			// Distraction Free Checkout.
			if ( astra_get_option( 'edd-distraction-free-checkout' ) ) {

				// HFB Support for distration free checkout.
				if ( true === astra_addon_builder_helper()->is_header_footer_builder_active ) {
					remove_action( 'astra_header', array( Astra_Builder_Header::get_instance(), 'prepare_header_builder_markup' ) );
					remove_action( 'astra_footer', array( Astra_Builder_Footer::get_instance(), 'footer_markup' ), 10 );
				}

				remove_action( 'astra_header', 'astra_header_markup' );
				remove_action( 'astra_footer', 'astra_footer_markup' );

				add_action( 'astra_header', array( $this, 'checkout_header_markup' ) );
				add_action( 'astra_footer', array( $this, 'checkout_footer_markup' ) );

				// Store Sidebar Layout.
				add_filter( 'astra_page_layout', array( $this, 'checkout_sidebar_layout' ), 99 );
			}
		}


User Contributed Notes

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