| @@ -1,12 +1,13 @@ | ||
| 1 | 1 | <?php namespace TierPricingTable\Addons\CatalogPrices; |
| 2 | 2 | |
| 3 | 3 | use TierPricingTable\Addons\AbstractAddon; |
| 4 | +use TierPricingTable\Addons\LayoutConfigurator\LayoutConfiguratorAddon; | |
| 4 | 5 | |
| 5 | 6 | class CatalogPricesAddon extends AbstractAddon { |
| 6 | 7 | |
| 7 | - public function getName() { | |
| 8 | - return __( 'Catalog Price Format', 'tier-pricing-table' ); | |
| 8 | + public function getName(): string { | |
| 9 | + return __( 'Shop & Categories Price Format', 'tier-pricing-table' ); | |
| 9 | 10 | } |
| 10 | 11 | |
| 11 | 12 | public function getDescription() { |
| 12 | 13 | return __( 'Manage how tiered pricing appears in catalogs, loops, and widgets.', 'tier-pricing-table' ); |
| @@ -25,8 +26,13 @@ | ||
| 25 | 26 | add_filter( 'tiered_pricing_table/settings/general_subsections', array( $this, 'addSettingsSubsection' ) ); |
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | public function addSettingsSubsection( $subsections ) { |
| 30 | + // the layout configurator carries these options while it is on | |
| 31 | + if ( LayoutConfiguratorAddon::isActive() ) { | |
| 32 | + return $subsections; | |
| 33 | + } | |
| 34 | + | |
| 29 | 35 | $subsections[] = CatalogPricesSubsection::class; |
| 30 | 36 | return $subsections; |
| 31 | 37 | } |
| 32 | 38 | } |