Last active
March 5, 2019 21:24
-
-
Save macgraphic/633c7ff1e90357ba422b802a3162778f to your computer and use it in GitHub Desktop.
Displays SVG icon in header for Yith Woo wishlist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function items_in_whishlist() { | |
if ( yith_wcwl_count_all_products() == 0 ) { ?> | |
<a data-toggle="wishlist-empty"> | |
<img src="<?php echo esc_url( get_stylesheet_directory_uri() . '/assets/images/heart-empty-24px.png' ); ?>"> | |
</a> | |
<?php | |
} else { ?> | |
<a href="<?php echo esc_url( site_url( '/wishlist' ) ); ?>" data-toggle="wishlist-fill"> | |
<img src="<?php echo esc_url( get_stylesheet_directory_uri() . '/assets/images/heart-fill-24px.png' ); ?>"> | |
</a> | |
<?php } | |
} | |
function items_in_basket() { | |
if ( WC()->cart->get_cart_contents_count() == 0 ) { ?> | |
<a data-toggle="mybasket-empty"> | |
<img src="<?php echo esc_url( get_stylesheet_directory_uri() . '/assets/images/basket-empty-24px.png' ); ?>"> | |
</a> | |
<?php | |
} else { ?> | |
<a data-toggle="mybasket"> | |
<img src="<?php echo esc_url( get_stylesheet_directory_uri() . '/assets/images/basket-fill-24px.png' ); ?>"> | |
</a> | |
<?php } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment