Skip to content

Instantly share code, notes, and snippets.

View ablears's full-sized avatar

ablears

  • New Zealand
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>W2UI Demo: grid-3</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script type="text/javascript" src="http://rawgit.com/vitmalina/w2ui/master/dist/w2ui.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://rawgit.com/vitmalina/w2ui/master/dist/w2ui.min.css" />
</head>
<body>
@ablears
ablears / gist:273b6107c502736c2b24bcdca87220d6
Last active August 17, 2020 21:37
Add store locale to allowed country list in WooCommerce's Stripe plugin which whitelists countries since 4.5.1
function moso_add_country_to_stripe( $countries ) {
$wc_default_country = substr( get_option( 'woocommerce_default_country' ), 0, 2 );
if ( ! in_array( $wc_default_country, $countries ) ) {
$countries[] = $wc_default_country;
}
return $countries;
}
@ablears
ablears / Expires headers
Created December 11, 2017 21:03
Expires headers .htaccess
<IfModule mod_expires.c>
ExpiresActive on
# Media: images, video, audio
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
</IfModule>