You are here

public function CommerceLicenseRemoteBase::activate in Commerce License 7

Overrides CommerceLicenseBase::activate().

Overrides CommerceLicenseBase::activate

File

includes/plugins/license_type/base.inc, line 474
Abstract and interface plugin implementation.

Class

CommerceLicenseRemoteBase
Remote license base class.

Code

public function activate($sync = TRUE) {
  if ($sync) {

    // The license will be activated after the initial synchronization.
    $this->wrapper->status = COMMERCE_LICENSE_PENDING;
    $this->wrapper->sync_status = COMMERCE_LICENSE_NEEDS_SYNC;
  }
  else {
    $this->wrapper->status = COMMERCE_LICENSE_ACTIVE;
  }
  $this
    ->save();
}