-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added option to allow insecure connections
- Loading branch information
1 parent
fbf7fe6
commit 0bf9aaa
Showing
5 changed files
with
30 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,5 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
*.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,12 @@ Optionally, an email can also be specified: | |
|
||
let licenseManager = new WooCommerceSoftwareAddOn("example.com", "example", "[email protected]"); | ||
|
||
Additional option to allow insecure connections is also provided and is disabled by default. This can be used to handle errors from expired SSL certificates. | ||
|
||
let licenseManager = new WooCommerceSoftwareAddOn("example.com", "example", "[email protected]", true); | ||
|
||
**WARNING:** It is not recommended to allow insecure connections. Alternatively, the SSL certificate needs to be checked and renewed as necessary. | ||
|
||
|
||
## WooCommerceSoftwareAddOn Methods | ||
|
||
|
@@ -180,6 +186,7 @@ Some methods are also exported so it is usable without the need to create a `Woo | |
| version | Optional version information of the software license, default: null | | ||
| key_prefix | Optional prefix for generated license keys, default: null | | ||
| activations | Amount of activations possible per license key, default: 1 | | ||
| allowInsecure | Indicates whether to allow insecure connections (expired SSL certificates) | | ||
|
||
Return: [`Promise<WooCommerceSoftwareResult>`](#woocommercesoftwareresult) | ||
|
||
|
@@ -212,6 +219,7 @@ const { generateKey } = require("woocommerce-software-add-on"); | |
| license_key | License key to validate a single activation | | ||
| timestamp | Pass to check the timestamp of the activation, default: 0, ignored | | ||
| platform | Pass to check the platform used during activation,.default: null, auto-generated info | | ||
| allowInsecure | Indicates whether to allow insecure connections (expired SSL certificates) | | ||
|
||
Return: [`Promise<WooCommerceSoftwareResult>`](#woocommercesoftwareresult) | ||
|
||
|