This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Valet\Drivers\Specific\WordPressValetDriver; | |
class LocalValetDriver extends WordPressValetDriver { | |
/** @var string The remote host to proxy requests to */ | |
const REMOTE_HOST = 'https://remotehost.com/'; | |
/** @var string If the request URI starts with this, we want to proxy the request to the remote host */ | |
const URI_PREFIX = '/wp-content/uploads/'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'woocommerce_new_order_email_allows_resend', '__return_true' ); | |
add_action( 'woocommerce_checkout_order_processed', 'pending_new_order_notification', 20, 1 ); | |
function pending_new_order_notification( $order_id ) { | |
$delayTime = 600; | |
as_schedule_single_action(time() + $delayTime, 'queue_pending_email', array( $order_id ), 'customActions'); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//This function adds last name and the time, then a random number afterwards | |
add_filter( 'woocommerce_opayopi_vendortxcode', 'custom_vendor_tx_code', 10, 2); | |
function custom_vendor_tx_code($vendortxcode, $order) { | |
$vendortxcode = time().$order->get_billing_last_name().rand(0,999 ); | |
$vendortxcode = preg_replace( '/[^0-9a-zA-Z_\-]/', "", $vendortxcode ); | |
// Make sure it's not over 40 characters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php /* List taken from https://www.jamesharding.net/list-of-uk-counties/ */ ?> | |
[select your-county include_blank "Bedfordshire" "Berkshire" "Bristol" "Buckinghamshire" "Cambridgeshire" "Cheshire" "Cornwall" "County Durham" "Cumbria" "Derbyshire" "Devon" "Dorset" "East Riding of Yorkshire" "East Sussex" "Essex" "Gloucestershire" "Greater London" "Greater Manchester" "Hampshire" "Herefordshire" "Hertfordshire" "Humberside" "Isle of Wight" "Isles of Scilly" "Kent" "Lancashire" "Leicestershire" "Lincolnshire" "Merseyside" "Norfolk" "North Somerset" "North Yorkshire" "Northamptonshire" "Northumberland" "Nottinghamshire" "Oxfordshire" "Rutland" "Shropshire" "Somerset" "South Gloucestershire" "South Yorkshire" "Staffordshire" "Suffolk" "Surrey" "Tyne & Wear" "Warwickshire" "West Midlands" "West Sussex" "West Yorkshire" "Wiltshire" "Worcestershire" "Aberdeenshire" "Angus" "Argyll & Bute" "Ayrshire" "Banffshire" "Berwickshire" "Borders" "Caithness" "Clackmannanshire" "Dumfries & Galloway" "Dunbartonshire" "East Ayr |