ASTRA_Ext_WooCommerce_Markup::multistep_checkout_html_output( array $content )
Multistep checkout html output.
Description
Parameters
- $content
-
(array) (Required) content.
Return
(void)
Source
File: addons/woocommerce/classes/class-astra-ext-woocommerce-markup.php
public function multistep_checkout_html_output( $content ) { $active_class = 'ast-current'; $cart_active = is_cart() ? $active_class : null; $checkout_active = is_checkout() && ! is_wc_endpoint_url( 'order-received' ) ? $active_class : null; $order_received_active = is_wc_endpoint_url( 'order-received' ) ? $active_class : null; $enable_steps_numbers = astra_get_option( 'cart-multistep-steps-numbers' ); $steps_size = astra_get_option( 'cart-multistep-checkout-size' ); $step_number = astra_get_option( 'cart-multistep-checkout-font-case' ); ob_start(); ?> <div id="ast-checkout-wrap" class="ast-checkout-<?php echo esc_attr( $steps_size ); ?> ast-checkout-<?php echo esc_attr( $step_number ); ?>"> <a href="<?php echo esc_url( wc_get_cart_url() ); ?>" <?php if ( $cart_active ) { ?> class="<?php echo esc_attr( $cart_active ); ?>" <?php } ?>> <?php if ( $enable_steps_numbers ) { ?> <span class="ast-step-number"><?php esc_html_e( '1', 'astra-addon' ); ?></span><?php } ?><p><?php esc_html_e( 'Shopping Cart', 'astra-addon' ); ?></p> </a> <?php echo Astra_Builder_UI_Controller::fetch_svg_icon( 'angle-right' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <a href="<?php echo esc_url( wc_get_checkout_url() ); ?>" <?php if ( $checkout_active ) { ?> class="<?php echo esc_attr( $checkout_active ); ?>" <?php } ?>> <?php if ( $enable_steps_numbers ) { ?> <span class="ast-step-number"><?php esc_html_e( '2', 'astra-addon' ); ?></span><?php } ?><p><?php esc_html_e( 'Checkout details', 'astra-addon' ); ?></p> </a> <?php echo Astra_Builder_UI_Controller::fetch_svg_icon( 'angle-right' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> <a href="#" class="ast-disable-click <?php if ( $order_received_active ) { echo esc_attr( $order_received_active ); } ?> "> <?php if ( $enable_steps_numbers ) { ?> <span class="ast-step-number"><?php esc_html_e( '3', 'astra-addon' ); ?></span><?php } ?><p><?php esc_html_e( 'Order Complete', 'astra-addon' ); ?></p> </a> </div> <?php $custom_content = ob_get_clean(); $custom_content .= $content; echo $custom_content; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped }
Expand full source code Collapse full source code View on Trac
Changelog
Version | Description |
---|---|
3.9.0 | Introduced. |