Skip to content

Instantly share code, notes, and snippets.

Avatar

Grégoire Noyelle gregoirenoyelle

View GitHub Profile
@gregoirenoyelle
gregoirenoyelle / wc-add-new-country.php
Last active Apr 7, 2018 — forked from woogists/wc-add-new-country.php
Add a new country to countries list
View wc-add-new-country.php
<?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 );
}
@gregoirenoyelle
gregoirenoyelle / wc-unhook-remove-emails.php
Last active Apr 7, 2018 — forked from woogists/wc-unhook-remove-emails.php
[General Snippets] Unhook and remove WooCommerce default emails.
View wc-unhook-remove-emails.php
<?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 / 0_reuse_code.js
Created Nov 21, 2013
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console