How do I connect a WooCommerce product to a plugin, so that licences are automatically created and renewed?

In WooCommerce, edit the product.

Add two custom meta fields. N.B. These are not product attributes, but custom fields. To display the “custom fields” meta box (seen in the screenshot below), you must use the “screen options” in the top-right of the product editing screen.

  1. simbamanager_key : the value of this should equal your plugin slug (i.e. the slug of the plugin you are selling), followed by a colon, followed by the word all, followed by a colon, followed by how many months you wish a purchase to create a valid licence for (e.g. 12, for 1 year – or -1 for unlimited). (If you are using plugins with built-in add-ons (an expert feature), the “all” can be modified to indicate the specific add-on for the plugin).
  2. simbamanager_licences : this is optional, and is used to indicate how many licences this purchase is for (default: 1). For a variable product, you instead enter a comma-separated list of variation IDs followed by a colon, followed by the number of licences for each variation.

Here is an example (of the entry for this product itself, in our shop):

Editing WooCommerce product custom fields

Posted in: Simba Plugin Updates/Licensing/Renewal Manager