/**
  * Checks if the activation.json file exists, read and processes it.
  * 
  * @since 3.0.6
  * @return void
  */
 public function activationHook()
 {
     $licenseData = get_option('onp_license_' . $this->plugin->pluginName, array());
     if (!empty($licenseData)) {
         return;
     }
     $filepath = $this->plugin->pluginRoot . '/activation.json';
     if (!file_exists($filepath)) {
         return;
     }
     $data = json_decode(file_get_contents($filepath), true);
     // activate trial if it's needed
     if (isset($data['activate-trial']) && $data['activate-trial'] === true) {
         $args = array('fy_page' => 'license-manager', 'fy_action' => 'activateTrial', 'fy_plugin' => $this->plugin->pluginName);
         $urlToRedirect = '?' . http_build_query($args);
         factory_325_set_lazy_redirect($urlToRedirect);
         //@unlink( $filepath );
         return;
     }
     // applying an embedded key
     if (isset($data['embedded-key']) && !empty($data['embedded-key'])) {
         $dataToSave = $data['embedded-key'];
         $dataToSave['Embedded'] = true;
         $this->setLicense($dataToSave);
     }
 }
 /**
  * Runs activation actions.
  * 
  * @since 1.0.0
  */
 public function activate()
 {
     $this->setupLicense();
     factory_325_set_lazy_redirect(opanda_get_admin_url('how-to-use', array('opanda_page' => 'optinpanda')));
 }