How to integrate theme to envato?

Hi, I made a wordpress theme to sell on themeforest but I dont know how to integrate it to envato? I mean that envato api, purchase code function, theme autoupdate etc. Can you explain me these?

Someone like @baileyherbert is best to answer some of this as they are pretty much top of the pile when it comes to this type of execution.

There are other more generic requirements you will need to meet https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements and https://help.author.envato.com/hc/en-us/articles/360000470826-ThemeForest-General-File-Preparation-Guidelines

If it’s your first one then you may benefit from sharing your demo here for feedback before submitting.

1 Like

This is an advanced topic that is hard to talk about in brief. There’s no out-of-the-box solution for all of this – each author has their own implementation.

If you’re not experienced in this area, then I would personally suggest that you disregard purchase verification / automatic updates and instead focus on getting your themes approved first. You can always go back and add purchase verification in an update when you’re ready. The Envato Market plugin can manage updates for your customers in the mean time.

Anyway, I’ll try to break it down a bit:

Keygates:
Adding a keygate to your theme means you’ll require buyers to enter their purchase code before they can get updates, load demo content, or install bundled plugins – these are the only three things you are allowed to lock behind a keygate, and it’s all entirely optional.

To implement this yourself, you will need to set up an API on your own server which will handle the purchase code verification, see my guide [here] for a code example. Then, when a user enters their purchase code, you will need to connect to your API from the theme (e.g. via wp_remote_get) to validate it.

Your API will need to remember their purchase code and/or return its own API key which the theme will remember. This way, your API can then authorize things like demo content downloads or updates.

Automatic updates:
There are multiple ways to do this.

  • You can have the buyer enter their own API token, and you can use the Envato API to check the latest version and download any updates.
  • Or, you can use your API as a proxy for this process, making it easier for the buyer (they only need to supply a purchase code).
  • Or, you can have your buyers use the official Envato Market plugin, which will check for and install updates for you. :wink:
3 Likes

thanks a lot.I will try it.

1 Like

Try plugins.