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.
add_filter( 'woocommerce_email_recipient_new_order', 'custom_new_order_recipient', 10, 2 ); | |
function custom_new_order_recipient( $recipient, $order ) { | |
$shipping_zone = WC_Shipping_Zones::get_zone_matching_package( $order->get_shipping_packages() ); | |
if ( $shipping_zone ) { | |
$zone_id = $shipping_zone->get_id(); | |
// You can add more conditions to match specific shipping zones here | |
if ( $zone_id == 1 ) { | |
$recipient .= ', john@example.com'; | |
} elseif ( $zone_id == 2 ) { |
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@example.org'; |
/** | |
* wc_shipment_tracking_add_custom_provider | |
* | |
* Adds custom provider to shipment tracking | |
* Change the country name, the provider name, and the URL (it must include the %1$s) | |
* Add one provider per line | |
*/ | |
add_filter( 'wc_shipment_tracking_get_providers' , 'wc_shipment_tracking_better_hermes' ); |
.ratio-16-9, | |
.ratio-16-10, | |
.ratio-square { | |
display: block; | |
position: relative; | |
width: 100%; | |
height: 0; | |
} | |
.ratio-16-9 { |
/* | |
* Please note the wp_ prefix and change accordingly if needed! | |
* Also check the table names so you don't drop data of tables already there! | |
*/ | |
SET NAMES utf8mb4; | |
SET FOREIGN_KEY_CHECKS = 0; | |
-- ---------------------------- | |
-- Table structure for wp_wc_reserved_stock |
<?php | |
/* | |
Plugin Name: WP OneSignal Push To App | |
Description: Sets the URL to app_url so that OneSignal WordPress Push Notifications open the app instead of phone browser. Disables Browser Notifications. | |
Version: 1.0 | |
Author: Con & Anna Schneider | |
Author URI: https://conschneider.de | |
*/ | |
// If this file is called directly, abort. |
<?php | |
namespace Statamic\Addons\StartTax; | |
use Statamic\Extend\Filter; | |
class StartTaxFilter extends Filter | |
{ | |
/** | |
* This excludes entries that have a specific tag set. In this case 'Startseite'. |
<?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'; |