Download the PHP package appsero/client without Composer
On this page you can find all versions of the php package appsero/client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package client
AppSero Client
Version 2.0.2
- Installation
- Insights
- Dynamic Usage
Installation
You can install AppSero Client in two ways, via composer and manually.
1. Composer Installation
Add dependency in your project (theme/plugin):
Now add autoload.php
in your file if you haven't done already.
2. Manual Installation
Clone the repository in your project.
Now include the dependencies in your plugin/theme.
Insights
AppSero can be used in both themes and plugins.
The Appsero\Client
class has three parameters:
- hash (string, required) - The unique identifier for a plugin or theme.
- name (string, required) - The name of the plugin or theme.
- file (string, required) - The main file path of the plugin. For theme, path to
functions.php
Usage Example
Please refer to the installation step before start using the class.
You can obtain the hash for your plugin for the Appsero Dashboard. The 3rd parameter must have to be the main file of the plugin.
Make sure you call this function directly, never use any action hook to call this function.
For plugins example code that needs to be used on your main plugin file. For themes example code that needs to be used on your themes
functions.php
file.
Using the Updater (to manage Pro plugin updates)
By default the Appsero client doesn't include Updater functionalities in this client. If you want to manage updates for your premium plugins, please include the Updater separately inside your product
More Usage
1. Hiding the notice
Sometimes you wouldn't want to show the notice, or want to customize the notice message. You can do that as well.
2. Customizing the notice message
3. Adding extra data
You can add extra metadata from your theme or plugin. In that case, the keys has to be whitelisted from the Appsero dashboard.
add_extra
method also support callback as parameter, If you need database call then callback is best for you.
Or if you want to run a query then pass callback, we will call the function when it is necessary.
4. Set textdomain
You may set your own textdomain to translate text.
5. Get Plugin Data
If you want to get the most used plugins with your plugin or theme, send the active plugins' data to Appsero.
6. Set Notice Message
Change opt-in message text
Check License Validity
Check your plugin/theme is using with valid license or not, First create a global variable of License
object then use it anywhere in your code.
If you are using it outside of same function make sure you global the variable before using the condition.
Use your own license form
You can easily manage license by creating a form using HTTP request. Call license_form_submit
method from License object.
Set Custom Deactivation Reasons
First set your deactivation reasons in Appsero dashboard then map them in your plugin/theme using filter hook.
- id is the deactivation slug
- text is the deactivation title
- placeholder will show on textarea field
- icon You can set SVG icon with 23x23 size
Extended Actions
1. After allowing tracking permission
2. After dening tracking permission
3. After license is activated
4. After license is deactivated
5. After license is refreshed
6. After uninstall reason is submitted
Credits
Created and maintained by Appsero.