Astra_Woocommerce::woo_mini_cart_markup( string $device = 'desktop' )

Woocommerce mini cart markup markup


Description


Parameters

$device

(string) (Optional) Either 'mobile' or 'desktop' option.

Default value: 'desktop'


Return

(html)


Source

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

		public function woo_mini_cart_markup() {

			if ( is_cart() ) {
				$class = 'current-menu-item';
			} else {
				$class = '';
			}

			$cart_menu_classes = apply_filters( 'astra_cart_in_menu_class', array( 'ast-menu-cart-with-border' ) );

			ob_start();
			if ( is_customize_preview() && true === Astra_Builder_Helper::$is_header_footer_builder_active ) {
				Astra_Builder_UI_Controller::render_customizer_edit_button();
			}
			?>
			<div id="ast-site-header-cart" class="ast-site-header-cart <?php echo esc_attr( implode( ' ', $cart_menu_classes ) ); ?>">
				<div class="ast-site-header-cart-li <?php echo esc_attr( $class ); ?>">
					<?php $this->astra_get_cart_link(); ?>
				</div>
				<div class="ast-site-header-cart-data">
					<?php the_widget( 'WC_Widget_Cart', 'title=' ); ?>
				</div>
			</div>
			<?php
			return ob_get_clean();
		}

Changelog

Changelog
Version Description
1.2.2 Introduced.


User Contributed Notes

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