By running this action during WP-CLI requests, we can avoid front-end writes and make sure VIP Support roles and users are added properly through Admin VIP Console.
Run a WP CLI command to set up WP. Something like this wp core install --url=valet-vipgo-3279.test --title=test-vip-support --admin_user=dat --admin_password=dat --admin_email=info@example.com
Run wp role list
Verify that two VIP Supported roles are there
Multisite:
Run a WP CLI command to set up WP. Something like this wp core multisite-install --url=valet-vipgo-3279.test --title=test-vip-support --admin_user=dat --admin_password=dat --admin_email=info@example.com
Run wp role list --url=http://valet-vipgo-3279.test
Verify that two VIP Supported roles are there.
Create a new sub-site wp site create --slug=subsite-2.
Run wp role list --url=http://valet-vipgo-3279.test/subsite-2/
Fix #90
Description
By running this action during WP-CLI requests, we can avoid front-end writes and make sure VIP Support roles and users are added properly through Admin VIP Console.
The detailed approach is discussed here https://github.com/Automattic/vip-support/issues/90#issuecomment-801691535 with a small change to the
wp_loaded
hook.Tests
Single site:
wp core install --url=valet-vipgo-3279.test --title=test-vip-support --admin_user=dat --admin_password=dat --admin_email=info@example.com
wp role list
Multisite:
wp core multisite-install --url=valet-vipgo-3279.test --title=test-vip-support --admin_user=dat --admin_password=dat --admin_email=info@example.com
wp role list --url=http://valet-vipgo-3279.test
wp site create --slug=subsite-2
.wp role list --url=http://valet-vipgo-3279.test/subsite-2/