Skip to content

Instantly share code, notes, and snippets.

@mikejolley
mikejolley / functions.php
Last active May 17, 2021 13:51
WooCommerce - Split shipping class items into a new package and limit shipping methods
/**
* This function loops over cart items, and moves any item with shipping class 'special-class' into a new package.
* The new package in this example only takes flat rate shipping.
*/
function split_special_shipping_class_items( $packages ) {
$found_item = false;
$special_class = 'special-class'; // edit this with the slug of your shippig class
$new_package = current( $packages );
$new_package['contents'] = array();
$new_package['contents_cost'] = 0;
@nivanmorgan
nivanmorgan / SVG-Low-Poly-Me.markdown
Created August 17, 2014 20:12
A Pen by Tim Inman.

SVG Low Poly Me

I'm experimenting with manipulating svg. The svg in question is a representation of my face which I created by averaging colors within triangle paths in Inkscape. It's not a 3D model, but it looks like it.

A Pen by Tim Inman on CodePen.

License.

.fc {
direction: ltr;
text-align: left; }
.fc table {
border-collapse: collapse;
border-spacing: 0; }
.fc .btn {
line-height: 1.2em; }
html .fc {