# tier-pricing-table/7.1.5/src/Addons/CartUpsells/CartUpsellsAddon.php

Tiered Pricing Table for WooCommerce, version 7.1.5. 33 lines.

- Page: https://pluginprobe.com/plugins/tier-pricing-table/7.1.5/code/src/Addons/CartUpsells/CartUpsellsAddon.php
- Raw: https://pluginprobe.com/plugins/tier-pricing-table/7.1.5/raw/src/Addons/CartUpsells/CartUpsellsAddon.php
- Modified: 2026-06-26T14:29:16+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/tier-pricing-table/7.1.5/code/src/Addons/CartUpsells/CartUpsellsAddon.php#L10-L20`.

```php
<?php namespace TierPricingTable\Addons\CartUpsells;

use TierPricingTable\Addons\AbstractAddon;

class CartUpsellsAddon extends AbstractAddon {
	
	public function getName() {
		return __( 'Cart Upsells', 'tier-pricing-table' );
	}
	
	public function getDescription() {
		return __( 'Display an upsell message in the cart indicating how many items are needed to reach the next pricing tier.', 'tier-pricing-table' );
	}
	
	public function getIcon(): string {
		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>';
	}
	
	public function getSlug() {
		return 'cart-upsells';
	}
	
	public function run() {
		$this->getContainer()->initService( CartUpsellsService::class );
		add_filter( 'tiered_pricing_table/settings/general_subsections', array( $this, 'addSettingsSubsection' ) );
	}
	
	public function addSettingsSubsection( $subsections ) {
		$subsections[] = UpsellsSubsection::class;
		return $subsections;
	}
}

```
