Skip to content

Instantly share code, notes, and snippets.

@ChromeOrange
ChromeOrange / gist:5778923
Created June 14, 2013 01:59
Remove postcode requirement if billing or shipping country is Ireland
/**
* Remove postcode requirement if billing or shipping country is Ireland
* Add to your theme functions.php file
*/
add_action( 'woocommerce_checkout_process', 'custom_country_check' );
function custom_country_check(){
global $woocommerce;
@codelance
codelance / config.php
Last active April 14, 2018 07:27
Add mailchimp subscribe to woocommerce checkout.
/**
* Subscribe User to MailChimp
*/
function wooms_mailchimp_subscribe_user($order_id,$posted){
if(!empty($_POST['wooms_susbscribe']) && $_POST['wooms_susbscribe'] == '1'){
try{
$email = $posted['billing_email'];
$merge_vars = array('FNAME' => $posted['billing_first_name'],'LNAME' => $posted['billing_last_name']);
$api = new MCAPI(mailchimp_api_key);