Skip to content

Instantly share code, notes, and snippets.

View diegoversiani's full-sized avatar

Diego Versiani diegoversiani

View GitHub Profile
@diegoversiani
diegoversiani / cart-ajax.js
Last active February 15, 2024 12:32
Detect quantity field updates (redacted for brevity)
/**
* Manage cart items ajax actions.
*
* DEPENDS ON:
* - jQuery // Interact with WooCommerce events
*/
(function (root, factory) {
if ( typeof define === 'function' && define.amd ) {
define([], factory(root));
} else if ( typeof exports === 'object' ) {
@diegoversiani
diegoversiani / functions.php
Created May 3, 2016 17:40 — forked from jameskoster/functions.php
Query whether WooCommerce is activated
if ( ! function_exists( 'is_woocommerce_activated' ) ) {
function is_woocommerce_activated() {
if ( class_exists( 'woocommerce' ) ) { return true; } else { return false; }
}
}
@diegoversiani
diegoversiani / fontawesome-content-mixin.scss
Created April 9, 2016 14:53
FontAwesome Mixin in scss for using with :before and :after pseudo-classes
@mixin font-awesome-content($icon-code) {
content: $icon-code;
font-family: 'FontAwesome';
font-weight: normal;
font-style: normal;
margin:0px 0px 0px 10px;
text-decoration:none;
}
// Usage example: