PluginProbe
Boxzilla – WordPress Popup Builder / 3.1.9
Boxzilla – WordPress Popup Builder v3.1.9
3.4.11 3.4.10 3.4.9 3.4.3 3.4.4 3.4.5 3.4.6 3.4.7 3.4.8 trunk 3.0 3.0.1 3.0.2 3.0.3 3.1 3.1.1 3.1.10 3.1.11 3.1.12 3.1.13 3.1.14 3.1.15 3.1.16 3.1.17 3.1.18 All 72 releases
← All changes | src/licensing/class-license-manager.php +7 -7 3.1.133.1.9 View file →
@@ -52,9 +52,9 @@
52 52 return isset( $object->$property ) ? $object->$property : $default;
53 53 }
54 54
55 55 /**
56 - * @return void
56 + * @return bool
57 57 */
58 58 public function hook() {
59 59
60 60 // do nothing if no extensions are registered at this point
@@ -118,10 +118,8 @@
118 118 $this->deactivate_license();
119 119 } elseif( $action === 'activate' || $key_changed ) {
120 120 $this->activate_license();
121 121 }
122 -
123 - $this->license->save();
124 122 }
125 123
126 124 /**
127 125 * Deactivate the license
@@ -127,10 +125,10 @@
127 125 * Deactivate the license
128 126 */
129 127 protected function deactivate_license() {
130 128 try {
131 - $this->api->deactivate_license();
132 - $this->notices->add( 'Your license was successfully deactivated!', 'info' );
129 + $activation = $this->api->deactivate_license();
130 + $this->notices->add( $activation->message, 'info' );
133 131 } catch( API_Exception $e ) {
134 132 $this->notices->add( $e->getMessage(), 'warning' );
135 133 }
136 134
@@ -135,8 +133,9 @@
135 133 }
136 134
137 135 $this->license->activated = false;
138 136 $this->license->activation_key = '';
137 + $this->license->save();
139 138 }
140 139
141 140 /**
142 141 * Activate the license
@@ -148,12 +147,13 @@
148 147 $this->notices->add( $e->getMessage(), 'warning' );
149 148 return;
150 149 }
151 150
152 - $this->license->activation_key = $activation->token;
151 + $this->license->activation_key = $activation->key;
153 152 $this->license->activated = true;
153 + $this->license->save();
154 154
155 - $this->notices->add( 'Your license was successfully activated!', 'info' );
155 + $this->notices->add( $activation->message, 'info' );
156 156 }
157 157
158 158 /**
159 159 * Shows the license form