PluginProbe
Tiered Pricing Table for WooCommerce / 8.0.2
Tiered Pricing Table for WooCommerce v8.0.2
8.0.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 All 91 releases
tier-pricing-table / src / Addons / PricingSummary / PricingSummaryAddon.php

PricingSummaryAddon.php in Tiered Pricing Table for WooCommerce 8.0.2, at src/Addons/PricingSummary/PricingSummaryAddon.php

39 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\PricingSummary;
2
3 use TierPricingTable\Addons\AbstractAddon;
4 use TierPricingTable\Addons\LayoutConfigurator\LayoutConfiguratorAddon;
5
6 class PricingSummaryAddon extends AbstractAddon {
7
8 public function getName() {
9 return __( 'Pricing Summary', 'tier-pricing-table' );
10 }
11
12 public function getDescription() {
13 return __( 'Display a dynamic pricing summary showing the total cost of the selected quantity.', 'tier-pricing-table' );
14 }
15
16 public function getIcon(): string {
17 return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 17H7v-7h2v7zm4 0h-2V7h2v10zm4 0h-2v-4h2v4z"/></svg>';
18 }
19
20 public function getSlug() {
21 return 'pricing-summary';
22 }
23
24 public function run() {
25 $this->getContainer()->initService( PricingSummaryService::class );
26 add_filter( 'tiered_pricing_table/settings/general_subsections', array( $this, 'addSettingsSubsection' ) );
27 }
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
35 $subsections[] = SummarySubsection::class;
36 return $subsections;
37 }
38 }
39