Go back to the Hosting Config tab and save the API keys.
API Keys in the Hosting Config Tab
Be sure to click Save after entering the API key details.
Now that the API keys are stored in your Version, your Tenants will be able to successfully manage domains on your platform.
The Domains tab is blocked on Versions, as there should be no need to map domains on a Version.
Domains Tab Blocked on Versions
Go back to the WPCS Dashboard, and Deploy the Snapshot. Or, if you have a customized solution in place, ensure your Tenants will be provisioned based on the configured Snapshot.
Deploying the Version in WPCS
How Domain Mapping Works for SaaS/WaaS Customers
To see how it works for your customers (Tenants), go back to the Actions menu and click Create Tenant. This will give you access to the Version you want your customers to see.
Each Tenant has a cost associated with it on WPCS, so if you don't need the extra Tenant, you might only want to create it temporarily for testing purposes and delete the extra Tenant after you're done testing.
Create a Tenant in WPCS
Tenants will have full access to manage domains in the Domain Mapping tab.
The Hosting Config tab is hidden from Tenants to protect your API keys.
Go to manage your Tenant and login. Visit the Domain Mapping tab, and you will see the root domain of the site at the top.
Root Domain Listed in Domain Mapping System Settings
You can then add any domains you want to the list, and they will be synced to the Domains section of the Tenant automatically, as seen in these two screenshots:
Mapped Domain in Domain Mapping System Settings
Mapped Domain in WPCS Dashboard
The main domain of the site can be set by clicking Set as Main, which matches the corresponding functionality in the WPCS Dashboard.
Set Mapped Domain as Main in Domain Mapping System Settings
Set as Main in WPCS Dashboard
When setting a domain as the main domain for the site, a warning message pops up that informs customers that they will have to login with the new URL and to ensure they already have access to their site's login credentials.
Warning Notification when Setting a New Domain as Main
When setting a new domain as the main domain, a customer will be logged out and will have to log back in with the new domain manually.
If you ever update the plugin version - just like with any other plugin or theme updates on WPCS - you'll have to redeploy the updated Version to your existing Tenants in order for them to get the new features.
Resetting Tenant API Keys
If you need to reset your Tenant's API keys for any reason, you can do so by simply logging in to the Tenant and visiting the settings area of Domain Mapping System. Then, attach the new API keys as query strings to the URL in this format:
Important: Replace abc123 and xyz123 in the URL with your API Key and API Secret respectively.
If you want to wipe the existing API keys, pass the query strings with empty parameters (just leave out your API keys and delete abc123 and xyz123).
Configuration of the settings will still work on the Tenants event if the API keys are incorrect. However, new domain mapping may not work properly if the Tenant is not set up properly with the mapped domain.
If you have any questions about how the WPCS integration works, feel free to reach out to support and we'll get back to you as soon as possible.