PluginProbe
Tiered Pricing Table for WooCommerce / 6.5.0
Tiered Pricing Table for WooCommerce v6.5.0
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 / TieredPricingCart / TieredPricingCartAddon.php

TieredPricingCartAddon.php in Tiered Pricing Table for WooCommerce 6.5.0, at src/Addons/TieredPricingCart/TieredPricingCartAddon.php

33 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\TieredPricingCart;
2
3 use TierPricingTable\Addons\AbstractAddon;
4
5 class TieredPricingCartAddon extends AbstractAddon {
6
7 public function getName() {
8 return __( 'Cart Display Options', 'tier-pricing-table' );
9 }
10
11 public function getDescription() {
12 return __( 'Manage how tiered pricing and discounts appear on the cart page.', '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="M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"/></svg>';
17 }
18
19 public function getSlug() {
20 return 'cart-options';
21 }
22
23 public function run() {
24 $this->getContainer()->initService( TieredPricingCartService::class );
25 add_filter( 'tiered_pricing_table/settings/general_subsections', array( $this, 'addSettingsSubsection' ) );
26 }
27
28 public function addSettingsSubsection( $subsections ) {
29 $subsections[] = CartOptionsSubsection::class;
30 return $subsections;
31 }
32 }
33