Download the PHP package license-bridge/wordpress-sdk without Composer

On this page you can find all versions of the php package license-bridge/wordpress-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package wordpress-sdk

WordPress-SDK

Official License Bridge WordPress SDK. Add it to your plugin or theme to enable:

Requirements

Installation

Commit composer.json and composer.lock. Do not edit files inside vendor/ directly.

Quick integration

Create a helper function in your main plugin file (rename my_license to something unique to your plugin):

Loader::register() automatically wires:

You do not need to manually instantiate internal SDK classes.

Configuration

Pass these keys to Loader::register() (merged with SDK defaults):

Key Required Default Description
plugin-slug Yes — plugin_basename(__FILE__)
license-product-slug Yes — Product slug on License Bridge
license-bridge-url No https://licensebridge.com Market / checkout base URL
license-bridge-api-url No https://app.licensebridge.com API base URL (OAuth, license, updates)
license-bridge-oauth-token-uri No /oauth/token OAuth token path
plugin-transient-cache-expire No 43200 (12h) Plugin details cache (seconds)
cache-expire No 3600 (1h) General cache (seconds)

Local / staging example

Usage

Access the SDK via your helper or global:

Purchase link

Use in a button:

Inline checkout (wp-admin modal) — SDK 2.0+

Keep customers inside WordPress admin with a billing modal. Supports Paddle overlay and Stripe Elements. PayPal still uses the hosted purchase link (redirect).

Fixed plan on the button:

Let the customer pick a plan:

Key Description
plugin-file Main plugin file path (__FILE__) so SDK assets load from vendor/license-bridge/wordpress-sdk/assets
gateway paddle or stripe
plan-slug Fixed plan slug (optional when allow-plan-selection is true)
plan-type month, annual, or life (optional; inferred from API when omitted)
allow-plan-selection Show plan / billing-cycle selectors
label Button text

The hosted market link remains available as a fallback via purchase_link().

Check license

License details

Example fields: full_name, email, plan_type, active, subscribed, subscription, etc.

Cancel subscription

Post-purchase flow

After checkout, License Bridge redirects the customer to your WordPress admin. The SDK:

  1. Verifies the nonce
  2. Stores lk, client_id, client_secret
  3. Runs premium plugin upgrade (if a newer package is available)
  4. Redirects to Plugins screen:
    • wp-admin/plugins.php?license_upgraded=1 — upgrade ran
    • wp-admin/plugins.php?license_saved=1 — license saved, no newer version

Show admin feedback:

Important: Premium version on License Bridge must be higher than the installed free version for auto-upgrade to run.

Hooks

Example plugin

See license-example-plugin for a full working integration.

License

Copyright (c) License Bridge.

Licensed under the GNU General Public License v3.0.


All versions of wordpress-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package license-bridge/wordpress-sdk contains the following files

Loading the files please wait ...