Astra_Edd::astra_get_edd_cart()
Cart Link Displayed a link to the cart including the number of items present and the cart total
Description
Return
(void)
Source
File: inc/compatibility/edd/class-astra-edd.php
public function astra_get_edd_cart() {
$view_shopping_cart = apply_filters( 'astra_edd_view_shopping_cart_title', __( 'View your shopping cart', 'astra' ) );
$edd_cart_link = apply_filters( 'astra_edd_cart_link', edd_get_checkout_uri() );
if ( is_customize_preview() ) {
$edd_cart_link = '#';
}
?>
<a class="ast-edd-cart-container" href="<?php echo esc_url( $edd_cart_link ); ?>" title="<?php echo esc_attr( $view_shopping_cart ); ?>">
<?php
do_action( 'astra_edd_header_cart_icons_before' );
if ( apply_filters( 'astra_edd_default_header_cart_icon', true ) ) {
?>
<div class="ast-edd-cart-menu-wrap">
<span class="count">
<?php
if ( apply_filters( 'astra_edd_header_cart_total', true ) ) {
$cart_items = count( edd_get_cart_contents() );
echo esc_html( $cart_items );
}
?>
</span>
</div>
<?php
}
do_action( 'astra_edd_header_cart_icons_after' );
?>
</a>
<?php
}
Expand full source code Collapse full source code View on Trac
Changelog
| Version | Description |
|---|---|
| 1.5.5 | Introduced. |