The Easy Plugin Demo Remote plugin is included when the Premium Pack extension is purchased and provides seamless integration between your Easy Digital Downloads or WooCommerce store, to your Easy Plugin Demo environment. In order to keep Easy Plugin Demo Remote up to date, you should enter the license key as instructed below once received.
Let’s say that you have your store hosted within a separate environment to the demo environment (recommended). Within your demo environment, you use Easy Plugin Demo Premium Pack to create a number of demos that your customers can access. By installing the EPD Remote plugin onto your store website, it will use the WordPress REST API to read the data from the demo’s you have available. When editing your store products, you can select to include a Demo button. When a customer clicks that button, they are taken directly to the selected demo.
You can also make use of the
[epd_button] shortcode to output demo buttons anywhere on your store website.
Configuring EPD Remote
Once you have uploaded and activated the EPD Remote plugin to your WordPress Easy Digital Downloads or WooCommerce store, complete the following steps to get up and running:
- Under the WordPress Settings menu, click the Easy Plugin Demo item
- Enter the license key for EPD Remote that you received in your purchase email
- Click Save Changes and confirm that the license is activated – it will display an expiration date
- Enter the URL of the multisite primary website where your demos are hosted into the Remote EPD Site URL field
- Enter the default text for a demo button into the Demo Button Text field. The default is Launch Demo
- Choose an option for default demo button placement if required
- Click to Save Changes
With this configuration applied, you can proceed to add demo buttons to products and/or pages on your website. When these buttons are clicked, users will be redirected to the registration form hosted on your demo platform. However, you can utilised the Easy Plugin Demo REST API to present a form and have users complete the signup process directly on your primary website.
Utilising the Easy Plugin Demo REST API
To keep users on your primary website and avoid any redirects taking place, you can utilise the Easy Plugin Demo REST API. Follow the guide below to get started…
- Create a new page on your website and add the
[epd_register]shortcode to it. Publish the page when you’re done
- Under the WordPress Settings menu, click the Easy Plugin Demo item and then click the REST API Settings section link
- Check the box to Create Sites via REST to enable the REST API
- Select the page you created in the first step as the Registration Page
- If you are utilising the MailChimp features within the EPD Premium Pack, choose whether or not to Show MailChimp Signup on your registration form. If enabled, and your API keys are present within your instance of EPD Premium pack, a checkbox will be displayed at the bottom of the registration form enabling users to signup to your mailing list
- From the multisite instance where you have EPD Premium Pack installed, head to the network screen, Settings, Easy Plugin Demo, and click the Premium Features tab. Click the button to Reveal Secret Key and copy this key
- Back to the site where you have EPD Remote, paste the copied key into the EPD Premium Secret Key field
- Click the button to Reveal Secret Key and copy the key. Enter this key into the EPD Remote Secret Key field where you have the EPD Premium Pack installed. Save settings on this screen
- Choose your Registration Action. This is the action taken upon successful registration. The default is to Show Confirmation
- Enter the text you would like displayed as the confirmation of successful signup within the Confirmation Message text box. This text is only used if you have Show Confirmation selected within the Registration Action field
- Click to Save Settings
If you have correctly configured EPD Remote and EPD Premium Pack for the REST API, users who click the Demo Button’s on your site will now be able to complete demo registration without ever being redirected away from your site.
Adding a Demo Button to a Product
When editing your Easy Digital Downloads or WooCommerce product, a new Easy Plugin Demo Button metabox is visible. Within that box you can select the demo template that the product is associated with, the text to be displayed on the button, and where to auto place the button on the product page.
Using Shortcode to Output a Demo Button
If the automatic output of the demo button is not your preferred method, you can use the
[epd_button] shortcode to output a demo button anywhere on your stores website.
In order to do this, you will need to know the post ID of the demo template you created within your multisite demo environment. You will then use the shortcode as follows;
[epd_button demo_id="123" text="Go to Demo"]
The demo_id is a required option. The text option is optional and can be used to output any text for your button that you choose. If the text option is omitted, the default text is Launch Demo.