| @@ -33,10 +33,12 @@ | ||
| 33 | 33 | * @var Freemius |
| 34 | 34 | */ |
| 35 | 35 | private $licence; |
| 36 | 36 | |
| 37 | - const VERSION = '2.0'; | |
| 37 | + const VERSION = '2.2.2'; | |
| 38 | 38 | |
| 39 | + const DB_VERSION = '2.0'; | |
| 40 | + | |
| 39 | 41 | /** |
| 40 | 42 | * TierPricingTablePlugin constructor. |
| 41 | 43 | * |
| 42 | 44 | * @param string $mainFile |
| @@ -63,9 +65,9 @@ | ||
| 63 | 65 | */ |
| 64 | 66 | public function addPluginAction( $actions ) { |
| 65 | 67 | $actions[] = '<a href="' . $this->settings->getLink() . '">' . __( 'Settings', 'tier-pricing-table' ) . '</a>'; |
| 66 | 68 | |
| 67 | - if ( ! tpt_fs()->is_anonymous() ) { | |
| 69 | + if ( ! tpt_fs()->is_anonymous() && tpt_fs()->is_installed_on_site() ) { | |
| 68 | 70 | $actions[] = '<a href="' . $this->licence->getAccountPageUrl() . '"><b style="color: green">' . __( 'Account', |
| 69 | 71 | 'tier-pricing-table' ) . '</b></a>'; |
| 70 | 72 | } |
| 71 | 73 | |
| @@ -156,8 +158,9 @@ | ||
| 156 | 158 | delete_option( Settings::SETTINGS_PREFIX . 'table_title' ); |
| 157 | 159 | delete_option( Settings::SETTINGS_PREFIX . 'table_css_class' ); |
| 158 | 160 | delete_option( Settings::SETTINGS_PREFIX . 'tooltip_size' ); |
| 159 | 161 | |
| 162 | + // Premium | |
| 160 | 163 | delete_option( Settings::SETTINGS_PREFIX . 'show_discount_in_cart' ); |
| 161 | 164 | delete_option( Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog' ); |
| 162 | 165 | delete_option( Settings::SETTINGS_PREFIX . 'show_discount_column' ); |
| 163 | 166 | delete_option( Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog_type' ); |
| @@ -162,10 +165,12 @@ | ||
| 162 | 165 | delete_option( Settings::SETTINGS_PREFIX . 'show_discount_column' ); |
| 163 | 166 | delete_option( Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog_type' ); |
| 164 | 167 | delete_option( Settings::SETTINGS_PREFIX . 'lowest_prefix' ); |
| 165 | 168 | delete_option( Settings::SETTINGS_PREFIX . 'head_discount_text' ); |
| 169 | + delete_option( Settings::SETTINGS_PREFIX . 'clickable_table_rows' ); | |
| 170 | + delete_option( Settings::SETTINGS_PREFIX . 'show_total_price' ); | |
| 166 | 171 | |
| 167 | - delete_option(Updater::DB_OPTION); | |
| 172 | + delete_option( Updater::DB_OPTION ); | |
| 168 | 173 | } |
| 169 | 174 | |
| 170 | 175 | /** |
| 171 | 176 | * Plugin activation |
| @@ -171,27 +176,8 @@ | ||
| 171 | 176 | * Plugin activation |
| 172 | 177 | */ |
| 173 | 178 | public function activate() { |
| 174 | 179 | set_transient( 'tiered_pricing_table_activated', true, 100 ); |
| 175 | - | |
| 176 | - add_option( Settings::SETTINGS_PREFIX . 'display', 'yes' ); | |
| 177 | - add_option( Settings::SETTINGS_PREFIX . 'position_hook', 'woocommerce_after_add_to_cart_button' ); | |
| 178 | - add_option( Settings::SETTINGS_PREFIX . 'head_quantity_text', __( 'Quantity', 'tier-pricing-table' ) ); | |
| 179 | - add_option( Settings::SETTINGS_PREFIX . 'head_price_text', __( 'Price', 'tier-pricing-table' ) ); | |
| 180 | - add_option( Settings::SETTINGS_PREFIX . 'display_type', 'table' ); | |
| 181 | - add_option( Settings::SETTINGS_PREFIX . 'selected_quantity_color', '#cc99c2' ); | |
| 182 | - add_option( Settings::SETTINGS_PREFIX . 'table_title', '' ); | |
| 183 | - add_option( Settings::SETTINGS_PREFIX . 'table_css_class', '' ); | |
| 184 | - add_option( Settings::SETTINGS_PREFIX . 'tooltip_size', 15 ); | |
| 185 | - add_option( Settings::SETTINGS_PREFIX . 'tooltip_border', 'yes' ); | |
| 186 | - | |
| 187 | - // Premium | |
| 188 | - add_option( Settings::SETTINGS_PREFIX . 'show_discount_in_cart', 'yes' ); | |
| 189 | - add_option( Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog', 'yes' ); | |
| 190 | - add_option( Settings::SETTINGS_PREFIX . 'show_discount_column', 'yes' ); | |
| 191 | - add_option( Settings::SETTINGS_PREFIX . 'tiered_price_at_catalog_type', 'lowest' ); | |
| 192 | - add_option( Settings::SETTINGS_PREFIX . 'lowest_prefix', __( 'From', 'tier-pricing-table' ) ); | |
| 193 | - add_option( Settings::SETTINGS_PREFIX . 'head_discount_text', __( 'Discount (%)', 'tier-pricing-table' ) ); | |
| 194 | 180 | } |
| 195 | 181 | |
| 196 | 182 | public function deactivate() { |
| 197 | 183 | |