Skip to content

Instantly share code, notes, and snippets.

View lumonald's full-sized avatar
🏠
Working from home

Luke McDonald lumonald

🏠
Working from home
View GitHub Profile
@webaware
webaware / multisite-email-usernames.php
Last active March 31, 2021 09:22
WordPress plugin that allows users to register with email add username. NB: don't use when registering also creates a site, because it will get an invalid site name!
<?php
/*
Plugin Name: Multisite email usernames
Plugin URI: https://gist.github.com/webaware/9758737
Description: allow users to register on multisite with email address as user_name
Version: 3
Author: WebAware
Author URI: http://webaware.com.au/
*/
@claudiosanches
claudiosanches / add-to-cart.php
Last active September 7, 2025 21:00
WooCommerce - Template add-to-cart.php with quantity and Ajax!
<?php
/**
* Custom Loop Add to Cart.
*
* Template with quantity and ajax.
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly.
global $product;