Skip to content

Instantly share code, notes, and snippets.

View gregoirenoyelle's full-sized avatar

Grégoire Noyelle gregoirenoyelle

View GitHub Profile
@gregoirenoyelle
gregoirenoyelle / 0_reuse_code.js
Created November 21, 2013 12:22
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@gregoirenoyelle
gregoirenoyelle / wc-unhook-remove-emails.php
Last active April 7, 2018 09:48 — forked from woogists/wc-unhook-remove-emails.php
[General Snippets] Unhook and remove WooCommerce default emails.
<?php
/**
* Code goes in functions.php or a custom plugin.
*/
add_action( 'woocommerce_email', 'unhook_those_pesky_emails' );
function unhook_those_pesky_emails( $email_class ) {
/**
* Hooks for sending emails during store events
@gregoirenoyelle
gregoirenoyelle / wc-add-new-country.php
Last active April 7, 2018 09:59 — forked from woogists/wc-add-new-country.php
Add a new country to countries list
<?php
add_filter( 'woocommerce_countries', 'gnwooc2_ajouter_pays' );
function gnwooc2_ajouter_pays( $countries ) {
$new_countries = array(
'NIRE' => __( 'Irlande du NORD', 'woocommerce' ),
);
return array_merge( $countries, $new_countries );
}