PHPackages                             license-bridge/wordpress-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. license-bridge/wordpress-sdk

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

license-bridge/wordpress-sdk
============================

License Bridge WordPress SDK

1.0.28(4y ago)027GPL-3.0-onlyPHPPHP &gt;=5.4

Since Dec 28Pushed 4y ago1 watchersCompare

[ Source](https://github.com/License-Bridge/WordPress-SDK)[ Packagist](https://packagist.org/packages/license-bridge/wordpress-sdk)[ Docs](https://license-bridge.com)[ RSS](/packages/license-bridge-wordpress-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (26)Used By (0)

WordPress-SDK
=============

[](#wordpress-sdk)

This is official License Bridge WordPress SDK. Adding this SDK to your WordPress plugin you enables all features that comes with License Bridge platform.

- Licensing for WordPress plugin
- Landing page with Secure Checkout for customers to purchase a license. After purchase plugin will be auto updated with premium version.
- Recurring Payments - Build a sustainable business with recurring payments. Sell annual or monthly subscriptions.
- Automatic Updates for WordPress plugins &amp; themes

Integrate SDK with WordPress plugin
-----------------------------------

[](#integrate-sdk-with-wordpress-plugin)

This is an example how you can create your own unique method that will be used in your plugin only, and your global variable that will hold SDK.

Make sure to replace `my_license` with your own referrence.

```
if (!function_exists('my_license')) {
    // Create a helper function for easy SDK access.
    function my_license()
    {
        global $my_license;
        if ($my_license) {
            return $my_license;
        }

        include __DIR__ . '/vendor/license-bridge/wordpress-sdk/src/Boot/bootstrap.php';

        $pluginFilePath = __FILE__;
        $my_license = Loader::register($pluginFilePath, [
            'plugin-slug'                   => plugin_basename(__FILE__),
            'license-product-slug'          => 'my-first-product',
        ]);

        return $my_license;
    }
    my_license();
}

```

- **plugin-slug** is your plugin slug usualy created like this: `plugin_basename(__FILE__)`
- **license-product-slug** is a slug that represent your product/plugin/theme on License Bridge platform. **LINK To HELP FILE**

### Usage example

[](#usage-example)

To access to the SDK you can use the global variable you created for your own plugin.

```
$my_license

```

Or by calling the custom method that will return SDK without creating it each time.

```
my_license()

```

### Get a unique landing page URL for your product

[](#get-a-unique-landing-page-url-for-your-product)

```
$link = $my_license->purchase_link($plugin_slug);
// https://licensebridge.com/market/my-plugin

```

### Check if the user has a license key

[](#check-if-the-user-has-a-license-key)

```
if ($my_license->license_exists($plugin_slug)) {
    // User have the license
}

```

### Check if the license is active

[](#check-if-the-license-is-active)

```
if ($my_license->is_license_active($plugin_slug)) {
    // User license is active
}

```

### Get a license details

[](#get-a-license-details)

```
$response = $my_license->license($plugin_slug);

```

Response can be false is license does not exist. Expected response is an array with license details:

```
array (size=13)
  'first_name' => string 'John' (length=11)
  'last_name' => string 'Doe' (length=10)
  'full_name' => string 'John Doe' (length=22)
  'email' => string 'johndoe@mail.com' (length=20)
  'plan_type' => string 'month' (length=5)
  'plan_name' => string 'plan' (length=4)
  'charge_type' => string 'subscription' (length=12)
  'gateway' => string 'stripe' (length=6)
  'active' => boolean true
  'created_at' => string '01/27/2022 18:07:48' (length=19)
  'subscribed' => boolean true
  'cancelled' => boolean true
  'subscription' =>
    array (size=4)
      'stripe_id' => string 'sub_0KMcNuxCqoZozrbaG75rgcZs' (length=28)
      'stripe_customer_id' => string 'cus_L2hnYEuIw2p3pE' (length=18)
      'ends_at_formated' => string 'February 27, 2022' (length=17)
      'is_ended' => boolean false

```

### Cancel the user license request

[](#cancel-the-user-license-request)

Sometimes, when the user is subscribed to your plugin, you can allow a user to cancel subscription to your plugin. This is how the user can cancel license subscription.

```
if ($my_license->cancel_license($plugin_slug)) {
    // User license is canceled
}

```

### License

[](#license)

Copyright (c) License Bridge.

Licensed under the GNU general public license (version 3).

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~5 days

Recently: every ~23 days

Total

25

Last Release

1511d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3ce751675f59fc6ab1be5b732eaa815b827c586ea665fa780fe790e5e9e1aac3?d=identicon)[Djuki](/maintainers/Djuki)

---

Top Contributors

[![Djuki](https://avatars.githubusercontent.com/u/416411?v=4)](https://github.com/Djuki "Djuki (41 commits)")

---

Tags

pluginwordpresssdklicensethemewordpress pluginwordpress-themefreemium

### Embed Badge

![Health badge](/badges/license-bridge-wordpress-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/license-bridge-wordpress-sdk/health.svg)](https://phpackages.com/packages/license-bridge-wordpress-sdk)
```

###  Alternatives

[freemius/wordpress-sdk

Freemius WordPress SDK

307142.4k9](/packages/freemius-wordpress-sdk)[afragen/git-updater

A plugin to automatically update GitHub, Bitbucket, GitLab, or Gitea hosted plugins, themes, and language packs.

3.3k1.7k](/packages/afragen-git-updater)[appsero/client

Appsero Client

25527.6k10](/packages/appsero-client)[varunsridharan/wp-dependencies

Provides Function To Check if a plugin is active/inactive &amp; function to compare versions.

1032.5k1](/packages/varunsridharan-wp-dependencies)[balbuf/composer-wp

Manage WordPress core, plugins, and themes with composer.

173.6k](/packages/balbuf-composer-wp)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
