PluginProbe
Tiered Pricing Table for WooCommerce / trunk
Tiered Pricing Table for WooCommerce vtrunk
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
tier-pricing-table / src / Addons / YouSave / YouSaveAddon.php

YouSaveAddon.php in Tiered Pricing Table for WooCommerce trunk, at src/Addons/YouSave/YouSaveAddon.php

33 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php namespace TierPricingTable\Addons\YouSave;
2
3 use TierPricingTable\Addons\AbstractAddon;
4
5 class YouSaveAddon extends AbstractAddon {
6
7 public function getName() {
8 return __( '"You Save" Badge', 'tier-pricing-table' );
9 }
10
11 public function getDescription() {
12 return __( 'Display a badge showing customers how much they save when tiered pricing is applied.', 'tier-pricing-table' );
13 }
14
15 public function getIcon(): string {
16 return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.41 11.58l-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58.55 0 1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41 0-.55-.23-1.06-.59-1.42zM5.5 7C4.67 7 4 6.33 4 5.5S4.67 4 5.5 4 7 4.67 7 5.5 6.33 7 5.5 7z"/></svg>';
17 }
18
19 public function getSlug() {
20 return 'you-save';
21 }
22
23 public function run() {
24 $this->getContainer()->initService( YouSaveService::class );
25 add_filter( 'tiered_pricing_table/settings/general_subsections', array( $this, 'addSettingsSubsection' ) );
26 }
27
28 public function addSettingsSubsection( $subsections ) {
29 $subsections[] = YouSaveSubsection::class;
30 return $subsections;
31 }
32 }
33