Frequently Asked Questions
How would I add the WP LICENSE AGENT code to my plugin or theme?
We provide a ZIP archive that you would extract and include within your plugin or theme. You would then require that file, and from there, you would add an array of values that tells your plugin or theme where to check for updates. This also automatically adds the license panel to your plugin or theme. For plugins, this shows up on the plugins screen underneath your plugin’s name, with the link “Update License.” For themes, the panel will show at the top of the Appearance > Themes screen in WordPress.
In your plugin or theme file, require the WP License Agent library:
require_once( dirname( __FILE__ ) . '/lib/wp-license-agent-client/wp-license-agent.php');
Create a settings array with the following info:
$wpla_settings = array( 'update_url' => 'server URL goes here', 'update_slug' => 'slug / name of directory of plugin or theme', 'main_file' => __FILE__, // main file of plug or any file in the theme 'news_widget' => true, // show plugin/theme news on the dashboard 'puc_errors' => true // show update checker errors, 'license_errors' = true // show a banner in the admin area if license errors exist, 'development' => false // set to true if you have a development version of the udpate defined on your WPLA server );
Finally, instantiate this object from your plugin or theme:
use \DustySun\WP_License_Agent\Client\v1_5 as WPLA; $wpla_update_checker = new WPLA\Licensing_Agent($wpla_settings);
Can I include the license panel wherever I want in my plugin or theme settings?
Of course! We provide some simple code that allows you to show the license panel on any settings screen within the WordPress dashboard. It’s as simple as this:
use \DustySun\WP_License_Agent\Client\v1_5 as WPLA; echo WPLA\License_Panel::show_license_panel('your-update-slug');
What if I need to enter a license manually?
No problem! While licenses can be automatically created as part of the WooCommerce checkout process, you also have the option of creating a manual license. In fact, you could technically use WP License Agent exclusively in this mode, should you so choose. WooCommerce isn’t required unless you want to automate the process.
Do you support more than one server?
Yes! If you have more than one store where you would like to sell your plugins, but you want to point all updates to one of these servers, we have an “external server mode” which allows you to set another server that can be checked for a valid license.
Put another way, if you sell your plugin or theme on Server A and Server B, but you set the plugin or theme to only check for updates from Server B, you would set Server B to check Server A for valid licenses as well. That way customers who purchased licenses from either server would still get the latest updates.
What is the license length for WP LICENSE AGENT?
License term is one-year from date of purchase. We provide support after the sale if you need help getting anything working with your plugin or theme or if you have any other questions related to using WP License Agent.
How do I offer trial licenses that expire after a certain period of time?
You simply click the toggle to set the “disable functionality” box if the license isn’t valid. Then you add code to your plugin or theme to check the license status that we’ve set for you within the WordPress database.
For example, you would set up a WooCommerce product with a license period of 7-days at a cost of $0, and you would label this as the “trial” option. Then in your plugin or theme you would set it to disable certain features if the license isn’t valid. After 7 days have passed, the customer’s license will be invalid. Our updater will set that the license isn’t valid in the WordPress database, and since you’ve set your software to stop working if the license isn’t valid, the plugin or theme would no longer work for the customer preserving your hard-earned work.
Can I disable my plugin or theme if the customer’s license has expired?
Yes! The process is virtually identical to the trial license process. When creating an update package within WP License Agent, you simply click the toggle to set the “disable functionality” box if the license isn’t valid. Then you add code to your plugin or theme to check the license status that we’ve set for you within the WordPress database.
From there, you can choose to disable your plugin or theme partially or fully, depending on your choice.
Can I offer free updates?
Sure – you simply add a plugin or theme file as an update package and click the toggle to set it to FREE updates. This allows you to offer free plugin updates, much like you would on WordPress.org or on GitHub. You can also use this to allow free updates to people who’s licenses have expired. Of course, the default setting is to not allow free updates, but there are some cases where you may want to offer free updates along with the restricted, license-required updates.
What types of licenses can I sell?
We support licenses of any term length from days, to years, to unlimited/forever licenses. You can also restrict the number of sites upon which the license can be used, allowing you to offer individual site licenses, licenses good for five sites, licenses good for an unlimited number of sites, etc.
Do I still have to pay my payment processor (PayPal, Stripe, etc.)?
Yes – when we say you keep 100% of every sale, we mean we aren’t taking a cut like Envato or any other marketplace. You will still need to pay your payment processor whatever they are charging you, but this is an order of magnitude smaller than any marketplace fee. Bottom line is that we don’t take a cut of anything you sell – the only money we make is when you buy WP License Agent – that’s it!
Want to Know More?
Please, feel free to reach out with a message below. We answer all pre-sales questions, and of course, we provide support after the sale as well.
Don’t wait – send us your message below!