Skip to content

Instantly share code, notes, and snippets.

Avatar

Bold Move makeitaboldmove

View GitHub Profile
@RocketFever22
RocketFever22 / models.js
Last active Jul 14, 2020
A simple way to approach routing in express.js
View models.js
// This file should be in routes/models.js
const routes = require('express').Router();
const data = require('../data.json');
routes.get('/', (req, res) => {
res.status(200).json(data.models);
});
routes.get('/:modelId', (req, res) => {
@helgatheviking
helgatheviking / woocommerce-shipping-contact.php
Last active Oct 6, 2021
Add a shipping email/phone field to checkout and notify of new orders
View woocommerce-shipping-contact.php
<?php
/*
Plugin Name: WooCommerce Shipping Contact
Plugin URI: https://github.com/helgatheviking/wc-shipping-contact
Description: Add a shipping email field to checkout and notify of new orders
Version: 1.1.0
Author: Kathy Darling
Author URI: http://kathyisawesome.com
Requires at least: 4.0
Tested up to: 4.8