Download the PHP package freemius/wordpress-sdk without Composer

On this page you can find all versions of the php package freemius/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

Freemius WordPress SDK

Welcome to the official repository for the Freemius SDK! Adding the SDK to your WordPress plugin, theme, or add-ons, enables all the benefits that come with using the Freemius platform such as:

Freemius truly empowers developers to create prosperous subscription-based businesses.

If you're new to Freemius then we recommend taking a look at our Getting Started guide first.

If you're a WordPress plugin or theme developer and are interested in monetizing with Freemius then you can sign-up for a FREE account:

https://dashboard.freemius.com/register/

Once you have your account setup and are familiar with how it all works you're ready to begin integrating Freemius into your WordPress product

You can see some of the existing WordPress.org plugins & themes that are already utilizing the power of Freemius here:

Code Documentation

You can find the SDK's documentation here: https://freemius.com/help/documentation/wordpress-sdk/

Integrating & Initializing the SDK

As part of the integration process, you'll need to add the latest version of the Freemius SDK into your WordPress project.

Then, when you've completed the SDK integration form a snippet of code is generated which you'll need to copy and paste into the top of your main plugin's PHP file, right after the plugin's header comment.

Note: For themes, this will be in the root functions.php file instead.

A typical SDK snippet will look similar to the following (your particular snippet may differ slightly depending on your integration):

Usage example

You can call anySDK methods by prefixing them with the shortcode function for your particular plugin/theme (specified when completing the SDK integration form in the Developer Dashboard):

Or when calling Freemius multiple times in a scope, it's recommended to use it with the global variable:

There are many other SDK methods available that you can use to enhance the functionality of your WordPress product. Some of the more common use-cases are covered in the Freemius SDK Gists documentation.

Adding license based logic examples

Add marketing content to encourage your users to upgrade for your paid version:

Add logic which will only be available in your premium plugin version:

To add a function which will only be available in your premium plugin version, simply add __premium_only as the suffix of the function name. Just make sure that all lines that call that method directly or by hooks, are also wrapped in premium only logic:

Add logic which will only be executed for customers in your 'professional' plan:

Add logic which will only be executed for customers in your 'professional' plan or higher plans:

Add logic which will only be available in your premium plugin version AND will only be executed for customers in your 'professional' plan (and higher plans):

Add logic only for users in trial:

Add logic for specified paid plan:

Excluding files and folders from the free plugin version

There are two ways to exclude files from your free version.

  1. Add __premium_only just before the file extension. For example, functions__premium_only.php will be only included in the premium plugin version. This works for all types of files, not only PHP.
  2. Add @fs_premium_only a special meta tag to the plugin's main PHP file header. Example:

In the example plugin header above, the file /lib/functions.php and the directory /premium-files/ will be removed from the free plugin version.

WordPress.org Compliance

Based on WordPress.org Guidelines you are not allowed to submit a plugin that has premium code in it:

All code hosted by WordPress.org servers must be free and fully-functional. If you want to sell advanced features for a plugin (such as a "pro" version), then you must sell and serve that code from your own site, we will not host it on our servers.

Therefore, if you want to deploy your free plugin's version to WordPress.org, make sure you wrap all your premium code with if ( my_prefix_fs()->{{ method }}__premium_only() ) or use some of the other methods provided by the SDK to exclude premium features & files from the free version.

Deployment

Zip your Freemius product’s root folder and upload it in the Deployment section in the Freemius Developer's Dashboard. The plugin/theme will automatically be scanned and processed by a custom-developed PHP Processor which will auto-generate two versions of your plugin:

  1. Premium version: Identical to your uploaded version, including all code (except your secret_key). Will be enabled for download ONLY for your paying or in trial customers.
  2. Free version: The code stripped from all your paid features (based on the logic added wrapped in { method }__premium_only()).

The free version is the one that you should give your users to download. Therefore, download the free generated version and upload to your site. Or, if your plugin was WordPress.org compliant and you made sure to exclude all your premium code with the different provided techniques, you can deploy the downloaded free version to the .org repo.

License

Copyright (c) Freemius®, Inc.

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

Contributing

Please see our contributing guide.


All versions of wordpress-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
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 freemius/wordpress-sdk contains the following files

Loading the files please wait ....