This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* This gist utilizes Yahoo's Weather API to snag the current | |
* weather conditions for any country given it's WOEID. | |
* | |
* - by Carwin Young | |
*/ | |
/* Set up some location WOEIDs */ | |
$Cambodia = 1020985; /* Phnom Pneh */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Plugin Name: Extend WooCommerce Subscription Intervals | |
* Description: Add a "every 10 weeks" billing interval to WooCommerce Subscriptions | |
* Author: Brent Shepherd | |
* Author URI: http://brent.io | |
* Version: 1.0 | |
* License: GPL v2 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This script prevents Marketo form submission if a user enters non-business email (Gmail, Hotmail, Yahoo, etc.) | |
//It will work on any page with a Marketo form, and runs when the form is ready | |
//For further info, please see Marketo form documentation, http://developers.marketo.com/documentation/websites/forms-2-0/ | |
//Prepared by Ian Taylor and Murtza Manzur on 9/9/2014 | |
<script> | |
(function (){ | |
// Please include the email domains you would like to block in this list | |
var invalidDomains = ["@gmail.","@yahoo.","@hotmail.","@live.","@aol.","@outlook."]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//clear entire cache when stock is reduced or replenished | |
function clear_cache_when_stock_changes( $order ) { | |
if(class_exists('PhpRedis_Purger') || class_exists('Predis_Purger')){ | |
global $nginx_purger; | |
$nginx_purger->purge_all(); | |
} | |
} | |