# sellkit/2.3.0/includes/contact-segmentation/conditions/cart-subtotal.php

SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster, version 2.3.0. 70 lines.

- Page: https://pluginprobe.com/plugins/sellkit/2.3.0/code/includes/contact-segmentation/conditions/cart-subtotal.php
- Raw: https://pluginprobe.com/plugins/sellkit/2.3.0/raw/includes/contact-segmentation/conditions/cart-subtotal.php
- Modified: 2024-10-09T07:00: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/sellkit/2.3.0/code/includes/contact-segmentation/conditions/cart-subtotal.php#L10-L20`.

```php
<?php

namespace Sellkit\Contact_Segmentation\Conditions;

use Sellkit\Contact_Segmentation\Conditions\Condition_Base;

defined( 'ABSPATH' ) || die();

/**
 * Class Cart Subtotal.
 *
 * @package Sellkit\Contact_Segmentation\Conditions
 * @since 1.1.0
 */
class Cart_Subtotal extends Condition_Base {

	/**
	 * Condition name.
	 *
	 * @since 1.1.0
	 */
	public function get_name() {
		return 'cart-subtotal';
	}

	/**
	 * Condition title.
	 *
	 * @since 1.1.0
	 */
	public function get_title() {
		return __( 'Cart Subtotal', 'sellkit' );
	}

	/**
	 * Condition type.
	 *
	 * @since 1.1.0
	 */
	public function get_type() {
		return [
			'less-than' => self::SELLKIT_NUMBER_CONDITION_VALUE,
			'greater-than' => self::SELLKIT_NUMBER_CONDITION_VALUE,
			'threshold-range' => 'threshold-range-field',
		];
	}

	/**
	 * Gets value.
	 *
	 * @since 1.1.0
	 */
	public function get_value() {
		if ( ! sellkit()->has_valid_dependencies() ) {
			return '';
		}

		return wc()->cart->get_subtotal();
	}

	/**
	 * It is pro feature or not.
	 *
	 * @since 1.1.0
	 */
	public function is_pro() {
		return true;
	}
}

```
