-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup-in-docker.sh
34 lines (28 loc) · 1.25 KB
/
setup-in-docker.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env bash
set -euo pipefail
# Install the WordPress core.
wp core install --url=http://localhost --title=ParcelProDev --admin_user=admin --admin_password=parcelpro1 [email protected]
# Enable debug logging.
wp config set WP_DEBUG true --raw
wp config set WP_DEBUG_LOG true --raw
# Ensure post ids are always unique (required for Parcel Pro orders).
echo "alter table wp_posts auto_increment=$(date +%s)" | mysql -h db -u wordpress --password=wordpress wordpress
# Install WooCommerce.
if [ -n "${1+x}" ]
then
wp plugin install woocommerce --activate --force --version="$1"
else
wp plugin install woocommerce --activate --force
fi
# Preset some WooCommerce settings.
wp option set woocommerce_default_country NL
# Skip the onboarding wizard.
wp option set woocommerce_onboarding_profile '{"skipped":true}' --format=json
# Dismiss reminders and notices.
wp option set woocommerce_task_list_reminder_bar_hidden yes
wp user meta set admin dismissed_no_secure_connection_notice 1
# Show all columns on the orders page.
wp user meta set admin managewoocommerce_page_wc-orderscolumnshidden '[]' --format=json
wp user meta set admin manageedit-shop_ordercolumnshidden '[]' --format=json
# Activate the Parcel Pro plugin.
wp plugin activate parcelpro