Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ if ( ! class_exists( 'SureCart\Licensing\Client' ) ) {
}
```

**Note:** Every plugin or theme that bundles the SDK shares the `SureCart\Licensing` namespace, so whichever copy loads first is used by all of them. An older copy bundled elsewhere can override fixes in yours. We recommend prefixing the namespace with a scoper such as [Strauss](https://github.com/BrianHenryIE/strauss) or [PHP-Scoper](https://github.com/humbug/php-scoper) when bundling.

## Include a release.json

Add a `release.json` file to the root of your plugin or theme project.
Expand Down
2 changes: 1 addition & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Client {
*
* @var string
*/
public $version = '1.2.2';
public $version = '1.2.3';

/**
* Name of the plugin
Expand Down
5 changes: 5 additions & 0 deletions src/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,11 @@ public function redirect( $url ) {
* @return void
*/
public function add_notice( $code, $message, $type = 'info' ) {
// Only loaded in wp-admin; the settings page re-runs get_activation() on render.
if ( ! function_exists( 'add_settings_error' ) ) {
return;
}

add_settings_error(
$this->name . '_license_options', // matches what we registered in `register_setting.
$code, // the error code.
Expand Down
Loading