PluginProbe
Tiered Pricing Table for WooCommerce / 2.0
Tiered Pricing Table for WooCommerce v2.0
7.1.7 7.1.5 7.1.4 7.1.1 6.5.0 6.4.0 6.1.0 trunk 1.0 1.1 2.0 2.0.1 2.0.2 2.1 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.3.0 2.3.1 2.3.2 2.3.3 2.3.4 All 90 releases
← All changes | src/TierPricingTablePlugin.php +20 -8 2.1.12.0 View file →
@@ -33,12 +33,10 @@
33 33 * @var Freemius
34 34 */
35 35 private $licence;
36 36
37 - const VERSION = '2.1';
37 + const VERSION = '2.0';
38 38
39 - const DB_VERSION = '2.0';
40 -
41 39 /**
42 40 * TierPricingTablePlugin constructor.
43 41 *
44 42 * @param string $mainFile
@@ -53,12 +51,8 @@
53 51 add_action( 'admin_init', [ $this, 'checkRequirePlugins' ] );
54 52
55 53 add_filter( 'plugin_action_links_' . plugin_basename( $this->fileManager->getMainFile() ),
56 54 [ $this, 'addPluginAction' ], 10, 4 );
57 -
58 - add_action('init', function(){
59 -
60 - });
61 55 }
62 56
63 57 /**
64 58 * Add setting to plugin actions at plugins list
@@ -90,9 +84,8 @@
90 84
91 85 if ( $valid && ! $updater->checkForUpdates() ) {
92 86
93 87 if ( is_admin() ) {
94 -
95 88 new Admin( $this->fileManager, $this->licence, $this->settings );
96 89 } else {
97 90 new Frontend( $this->fileManager, $this->licence, $this->settings );
98 91 }
@@ -178,8 +171,27 @@
178 171 * Plugin activation
179 172 */
180 173 public function activate() {
181 174 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' ) );
182 194 }
183 195
184 196 public function deactivate() {
185 197