Skip to content

Instantly share code, notes, and snippets.

@hiro288
hiro288 / card_in_cart.php
Last active April 17, 2016 12:11
Check if any product in cart has a certain Category
<?php
function card_in_cart() {
global $woocommerce;
$card_in_cart = false;
foreach ( $woocommerce->cart->get_cart() as $cart_item_key => $values ) {
$_product = $values['data'];
$terms = get_the_terms( $_product->id, 'product_cat' );
@hiro288
hiro288 / dabblet.css
Created November 29, 2013 10:25 — forked from anonymous/dabblet.css
(C)Leanest CSS spinner ever
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.