Skip to content

Instantly share code, notes, and snippets.

@zanematthew
zanematthew / post-receive.sh
Created January 22, 2013 19:03
This is a git post-receive hook that "deploys" code to your working tree using native git commands, edit as needed.
post-receive#!/bin/sh
###
# This file will deploy code from the repository into the
# specified web-root.
#
# File name: post-receive
#
# Instructions:
# 1. Uncomment and edit the lines below as needed
@mikejolley
mikejolley / gist:2044101
Last active May 18, 2021 17:02
WooCommerce - Show number of items in cart and total
<a class="cart-contents" href="<?php echo wc_get_cart_url(); ?>" title="<?php _e( 'View your shopping cart' ); ?>"><?php echo sprintf ( _n( '%d item', '%d items', WC()->cart->get_cart_contents_count() ), WC()->cart->get_cart_contents_count() ); ?> - <?php echo WC()->cart->get_cart_total(); ?></a>