| @@ -138,35 +138,12 @@ | ||
| 138 | 138 | } |
| 139 | 139 | $install = get_option( $this->get_key() . '_install', 0 ); |
| 140 | 140 | if ( 0 === $install ) { |
| 141 | 141 | $install = time(); |
| 142 | - /** | |
| 143 | - * Action to be triggered when the product is first activated. | |
| 144 | - * | |
| 145 | - * @param string $basefile The basefile of the product. | |
| 146 | - */ | |
| 147 | - do_action( 'themeisle_sdk_first_activation', $basefile ); | |
| 148 | - | |
| 149 | 142 | update_option( $this->get_key() . '_install', time() ); |
| 150 | 143 | } |
| 151 | - $this->install = (int) $install; | |
| 144 | + $this->install = $install; | |
| 152 | 145 | self::$cached_products[ crc32( $basefile ) ] = $this; |
| 153 | - $current_version = get_option( $this->slug . '_version', '' ); | |
| 154 | - | |
| 155 | - if ( $current_version !== $this->version && wp_cache_add( "{$this->slug}_version_upgrade", true, '', HOUR_IN_SECONDS ) ) { | |
| 156 | - /** | |
| 157 | - * Action to be triggered when the product is updated. | |
| 158 | - * | |
| 159 | - * @param string $current_version The current version of the product. | |
| 160 | - * @param string $new_version The new version of the product. | |
| 161 | - * @param string $basefile The basefile of the product. | |
| 162 | - */ | |
| 163 | - do_action( "themeisle_sdk_update_{$this->slug}", $current_version, $this->version, $basefile ); | |
| 164 | - | |
| 165 | - // Update the version of the product. | |
| 166 | - update_option( "{$this->slug}_version", $this->version ); | |
| 167 | - wp_cache_delete( "{$this->slug}_version_upgrade" ); | |
| 168 | - } | |
| 169 | 146 | } |
| 170 | 147 | |
| 171 | 148 | /** |
| 172 | 149 | * Return a product. |