I use Valet as my local web development environment (PHP, Laravel, Wordpress, ...)
This gist is my own recipe to install Wordpress from the command line to use it with Valet. Maybe this is useful for you too.
777 Brockton Avenue, Abington MA 2351 | |
30 Memorial Drive, Avon MA 2322 | |
250 Hartford Avenue, Bellingham MA 2019 | |
700 Oak Street, Brockton MA 2301 | |
66-4 Parkhurst Rd, Chelmsford MA 1824 | |
591 Memorial Dr, Chicopee MA 1020 | |
55 Brooksby Village Way, Danvers MA 1923 | |
137 Teaticket Hwy, East Falmouth MA 2536 | |
42 Fairhaven Commons Way, Fairhaven MA 2719 | |
374 William S Canning Blvd, Fall River MA 2721 |
<?php | |
// change the from name | |
add_filter( 'automatewoo/mailer/from_name', function( $from_name ) { | |
return 'My Custom From Name'; | |
}); | |
// change the from address | |
add_filter( 'automatewoo/mailer/from_address', function( $from_email ) { | |
return '[email protected]'; |
.ratio-16-9, | |
.ratio-16-10, | |
.ratio-square { | |
display: block; | |
position: relative; | |
width: 100%; | |
height: 0; | |
} | |
.ratio-16-9 { |
<?php | |
/** | |
* This class removes the default excerpt metabox | |
* and adds a new box with the wysiwyg editor capability | |
* @author etessore | |
*/ | |
class TinyMceExcerptCustomization{ | |
const textdomain = ''; | |
const custom_exceprt_slug = '_custom-excerpt'; |
<?php | |
/** | |
* Plugin Name: WooCommerce Email Customer Address | |
* Plugin URI: https://gist.github.com/BFTrick/7891074 | |
* Description: Email the site admin when a customer changes their address | |
* Author: Patrick Rauland | |
* Author URI: http://patrickrauland.com/ | |
* Version: 1.0.1 | |
* | |
* This program is free software: you can redistribute it and/or modify |
/** | |
* Gets Variation ID if available otherwise it will get the Product ID | |
* @param $product Product | |
* @param bool $check_variations Whether or not to check for variation IDs | |
* @return mixed | |
*/ | |
function get_id_from_product( $product, $check_variations = false ) { | |
if( $check_variations ) { | |
return ( isset( $product['variation_id'] ) | |
&& ! empty( $product['variation_id']) |
select | |
p.ID as order_id, | |
p.post_date, | |
max( CASE WHEN pm.meta_key = '_billing_email' and p.ID = pm.post_id THEN pm.meta_value END ) as billing_email, | |
max( CASE WHEN pm.meta_key = '_billing_first_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_first_name, | |
max( CASE WHEN pm.meta_key = '_billing_last_name' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_last_name, | |
max( CASE WHEN pm.meta_key = '_billing_address_1' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_1, | |
max( CASE WHEN pm.meta_key = '_billing_address_2' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_address_2, | |
max( CASE WHEN pm.meta_key = '_billing_city' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_city, | |
max( CASE WHEN pm.meta_key = '_billing_state' and p.ID = pm.post_id THEN pm.meta_value END ) as _billing_state, |
This document lists all the situations where WordPress sends an email, along with how to filter or disable each email.
This is accurate as of WordPress 4.8, and includes some upcoming changes in WordPress 4.9.
There are a few TODOs left. Please bear with me.
#!/bin/bash | |
# Usage: ./update-mysql56.sh | |
# Backup of all databases... JUST IN CASE | |
mysqldump --all-databases --single-transaction --events --user=root --password > ~/all_database_backup.sql | |
# Remove MySQL 5.5 | |
sudo apt-get remove mysql-server | |
sudo apt-get autoremove |