Skip to content

Instantly share code, notes, and snippets.

View fschmittlein's full-sized avatar

Frank Schmittlein fschmittlein

View GitHub Profile
@fschmittlein
fschmittlein / data.json
Last active April 23, 2022 20:43 — forked from hasinhayder/data.json
Wp Quick Configurator Data
{
"themes": [
"blocksy"
],
"plugins": [
"elementor",
"happy-elementor-addons",
"contact-form-7",
"woocommerce",
"query-monitor",
@fschmittlein
fschmittlein / sign-up-confirmation
Created February 27, 2022 15:50 — forked from MailPoet-Staff/sign-up-confirmation
MailPoet signup confirmation email
<!doctype html><html><head><meta charset="UTF-8"><title>Thanks for signing up</title></head><body bgcolor="#ffede3">
<table width="100%" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffede3"><tr><td>
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff"><tr><td colspan="3"><a href="http://www.mailpoet.com"><img style="display:block;border:0;outline:none;-ms-interpolation-mode:bicubic;" src="https://www.mailpoet.com/wp-content/uploads/2019/01/mailpoet-logo-orange-header.png" width="600" height="118" alt="MailPoet" /></a></td></tr><tr><td width="20"></td>
<td style="color:#071c6d;font-family:arial,sans-serif;font-size:15px;">
<b>Hello!</b>
Thanks for signing up.
@fschmittlein
fschmittlein / woocommerce_checkout_process.php
Last active February 24, 2022 12:34
Ist eine Hausnummer vorhanden?
add_action('woocommerce_checkout_process', 'custom_validation_process');
function custom_validation_process() {
global $woocommerce;
if (isset($_POST['billing_address_1']) and $_POST['billing_address_1'] != '') {
if (!preg_match('/([0-9]+)/Uis', $_POST['billing_address_1'])) {
if (function_exists('wc_add_notice'))
wc_add_notice( __('Hausnummer fehlt!'), 'error' );
else
$woocommerce->add_error( __('Hausnummer fehlt!') );
## download and install wordpress
## for ddev you can use --url=$DDEV_URL
wp core download --locale=de_DE --version=latest
#wp config create only ... without ddev
#wp config create --dbname=... --dbuser=... --dbpass=... --locale=de_DE --dbprefix=wp_...
wp core install --url=$DDEV_URL --title="..." --admin_user=... --admin_email=...
## anchor only with ddev
wp config set WP_POST_REVISIONS false --raw --add --anchor="/** Authentication Unique Keys and Salts. */"
wp config set WP_MEMORY_LIMIT 256M --add --anchor="/** Authentication Unique Keys and Salts. */"