PluginProbe
Tiered Pricing Table for WooCommerce / 2.2.2
Tiered Pricing Table for WooCommerce v2.2.2
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/Admin/Admin.php +9 -4 2.3.32.2.2 View file →
@@ -1,9 +1,8 @@
1 1 <?php
2 2
3 3 namespace TierPricingTable\Admin;
4 4
5 -use TierPricingTable\Admin\ProductManagers\ProductManager ;
6 5 use TierPricingTable\Freemius ;
7 6 use TierPricingTable\Settings\Settings ;
8 7 use TierPricingTable\TierPricingTablePlugin ;
9 8 use Premmerce\SDK\V2\FileManager\FileManager ;
@@ -54,12 +53,18 @@
54 53 add_action( 'admin_notices', [ $this, 'showActivationMessage' ] );
55 54 }
56 55
57 56 if ( $this->licence->isFree() ) {
58 - $template = 'upgrade-alert.php';
57 +
58 + if ( tpt_fs()->is_anonymous() || !tpt_fs()->is_installed_on_site() ) {
59 + $template = 'opt-in-alert.php';
60 + } else {
61 + $template = 'upgrade-alert.php';
62 + }
63 +
59 64 add_action( 'woocommerce_settings_' . Settings::SETTINGS_PAGE, function () use( $template ) {
60 65 $this->fileManager->includeTemplate( 'admin/alerts/' . $template, [
61 - 'upgradeUrl' => tpt_fs()->get_upgrade_url(),
66 + 'upgradeUrl' => $this->licence->getUpgradeLink(),
62 67 'contactUsUrl' => $this->licence->getContactUsPageUrl(),
63 68 ] );
64 69 $this->fileManager->includeTemplate( 'admin/only-in-premium-script.php' );
65 70 } );
@@ -72,9 +77,9 @@
72 77 */
73 78 public function initManagers()
74 79 {
75 80 $this->managers = [
76 - ProductManager::class => new ProductManager( $this->fileManager, $this->settings, $this->licence ),
81 + SimpleProductManager::class => new SimpleProductManager( $this->fileManager, $this->settings, $this->licence ),
77 82 VariationProductManager::class => new VariationProductManager( $this->fileManager, $this->settings, $this->licence ),
78 83 WooCommerceExport::class => new WooCommerceExport(),
79 84 WooCommerceImport::class => new WooCommerceImport(),
80 85 ];