Back to Getting Started

Importing Keys

If you have already generated a large quantity of keys, importing them via CSV or TXT is the most efficient way to add them to the WC Key Manager plugin for WordPress. Whether you’re managing digital products, software licenses, or subscription services, bulk uploading saves you time and ensures accuracy.

CSV File Import

CSV (Comma-Separated Values) file import is an ideal method for adding a large number of keys to the system at once. It minimizes manual entry errors and streamlines the process. However, keep in mind that the system will only import the first 1000 keys from the CSV file at a time.

List of Fields:

To successfully import keys using a CSV file, format each row in the file to represent a key entry. The required fields include:

  • key: Enter the key itself. This is a required field because every entry must contain a key.
  • product_id: Provide the ID of the product associated with the key. This is also a required field, ensuring that each key links to a specific product.
  • validity_for: Specify the number of days the key remains valid from the purchase date. This field is optional. If you leave it blank, the default value is 0, meaning the key will not expire.
  • expires_at: Set the specific date when the key will expire. This is another optional field. If not provided, the system defaults to null, indicating that the key does not have a predefined expiration date.
  • activation_limit: Indicate how many times the key can be used to activate the software. This is optional and defaults to 1 if you do not specify a value.

Make sure to format the CSV file correctly, with each field corresponding to the correct column. You can Download a sample CSV file here to understand the required format.

TXT File Import

TXT file import offers another way to add keys, particularly if you have keys in a simple text format. This method is efficient when you need to upload a list of keys for a single product.

Fields and Format:

  • Product: Select the product that the keys will be assigned to.
  • Activation Limit: Define the maximum number of times a key can be used. Setting this to 0 allows unlimited activations. If the product is not software-related, you can leave this field blank.
  • Valid For (days): Specify the relative expiration date from the purchase date. Leave this field empty if you do not want the keys to expire.
  • Text File: The TXT file should contain one key per line, with no additional formatting required. Download a sample TXT file here.

To finish the import process, upload the appropriate CSV or TXT file and click the import button. The system will then import the keys according to the specifications in the file.

Related Docs

Scroll to Top