| @@ -1,5 +1,10 @@ | ||
| 1 | 1 | <?php |
| 2 | +/** | |
| 3 | + * Frontend bootstrap. | |
| 4 | + * | |
| 5 | + * @package SpringDevs\Subscription | |
| 6 | + */ | |
| 2 | 7 | |
| 3 | 8 | namespace SpringDevs\Subscription; |
| 4 | 9 | |
| 5 | 10 | use SpringDevs\Subscription\Frontend\ActionController; |
| @@ -6,8 +11,9 @@ | ||
| 6 | 11 | use SpringDevs\Subscription\Frontend\Cart; |
| 7 | 12 | use SpringDevs\Subscription\Frontend\Downloadable; |
| 8 | 13 | use SpringDevs\Subscription\Frontend\MyAccount; |
| 9 | 14 | use SpringDevs\Subscription\Frontend\Order as FrontendOrder; |
| 15 | +use SpringDevs\Subscription\Frontend\Plans; | |
| 10 | 16 | use SpringDevs\Subscription\Frontend\Product; |
| 11 | 17 | |
| 12 | 18 | /** |
| 13 | 19 | * Frontend handler class |
| @@ -18,8 +24,14 @@ | ||
| 18 | 24 | * Frontend constructor. |
| 19 | 25 | */ |
| 20 | 26 | public function __construct() { |
| 21 | 27 | new Product(); |
| 28 | + // Pro ships a superset storefront plan UI (multi-plan selector, per-variation | |
| 29 | + // swap) on the same hooks, so free's single-line display runs only when Pro is | |
| 30 | + // absent — otherwise the two would double-render. | |
| 31 | + if ( ! subscrpt_pro_activated() ) { | |
| 32 | + new Plans(); | |
| 33 | + } | |
| 22 | 34 | new Cart(); |
| 23 | 35 | new FrontendOrder(); |
| 24 | 36 | new ActionController(); |
| 25 | 37 | new MyAccount(); |