The WPML Installer helps theme and plugin authors provide multilingual-ready themes and plugins to their clients. A tiny chunk of PHP code will offer your clients the option to buy, install, and activate WPML right from within your theme.
Here are the advantages of adding WPML’s Installer to your theme or plugin:
- It is solid proof to your clients that your theme or plugin is multilingual-ready and fully compatible with WPML
- Provide your clients with an easy way to buy, install, and activate WPML
- Your clients get an exclusive 10% discount when buying WPML from within your theme or plugin
- You get up to 27% affiliate commission for every sale
Before we delve into how this is done, take a look at what your client will see once you have added the WPML Installer:
The installer is a public Composer library. To set it up, use the following steps:
- Get Composer
- Add the Installer as a dependency of your theme or plugin:
composer require otgs/installer
- Load the Installer bootstrap file and configure it accordingly, before the init hook:
You can see the WPML Installer by navigating to Plugins -> Add New, under the Commercial tab.
In this example, we add a new tab to the theme options admin screen. The code below is specific to our example theme and shows how to register multiple tabs. You can use this code for inspiration, but note that your theme will use different code. Thus, you cannot copy/paste it “as is.”
You can easily find online tutorials on adding tabs to theme options for WordPress.
Custom admin installer:
Your clients can now install and activate WPML from within your theme, making it very easy for them to create multilingual sites using WPML.
WPML Installer works with our affiliate program, which offers you a commission from every sale you make. You can include your affiliate information in Installer. WPML sales that start from within your theme are counted toward your affiliate account.
To enjoy affiliate commission, you need to set your affiliate ID and affiliate key. You can get these by going to your WPML account and clicking the Affiliate link and payment link.
Use this form if you need help in adding the WPML Installer to your theme or plugin.