| 1 |
<?php |
| 2 |
/** |
| 3 |
* The plugin installer class. |
| 4 |
* |
| 5 |
* @since 1.0.0 |
| 6 |
* |
| 7 |
* @package woo-additional-terms |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace Woo_Additional_Terms; |
| 11 |
|
| 12 |
use Woo_Additional_Terms\Enhancements; |
| 13 |
|
| 14 |
/** |
| 15 |
* The plugin installer class. |
| 16 |
*/ |
| 17 |
class Installer { |
| 18 |
|
| 19 |
/** |
| 20 |
* Activate the plugin. |
| 21 |
* |
| 22 |
* @since 1.0.0 |
| 23 |
* |
| 24 |
* @return void |
| 25 |
*/ |
| 26 |
public static function activate() { |
| 27 |
|
| 28 |
// Add the activation timestamp, if not already added. |
| 29 |
woo_additional_terms()->service( 'options' )->add_usage_timestamp(); |
| 30 |
} |
| 31 |
|
| 32 |
/** |
| 33 |
* Deactivate the plugin. |
| 34 |
* |
| 35 |
* @since 1.0.0 |
| 36 |
* |
| 37 |
* @return void |
| 38 |
*/ |
| 39 |
public static function deactivate() { |
| 40 |
|
| 41 |
delete_transient( Enhancements\Rate::TRANSIENT_NAME ); |
| 42 |
} |
| 43 |
} |
| 44 |
|