Skip to content

Instantly share code, notes, and snippets.

View duyngha's full-sized avatar
💭
I may be slow to respond.

Duy duyngha

💭
I may be slow to respond.
View GitHub Profile
@woogists
woogists / wc-show-cart-contents-total-ajax.php
Last active December 31, 2023 10:08
[Theming Snippets] Show cart contents / total Ajax
/**
* Show cart contents / total Ajax
*/
add_filter( 'woocommerce_add_to_cart_fragments', 'woocommerce_header_add_to_cart_fragment' );
function woocommerce_header_add_to_cart_fragment( $fragments ) {
global $woocommerce;
ob_start();