PluginProbe
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster / 1.3.2
SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster v1.3.2
2.7.0 2.6.0 trunk 1.1.0 1.1.4 1.2.1 1.2.2 1.2.3 1.2.5 1.2.9 1.3.1 1.3.2 1.5.0 1.5.1 1.5.4 1.5.7 1.5.8 1.5.9 1.6.2 1.6.5 1.6.8 1.7.2 1.7.4 1.7.5 1.7.9 All 43 releases
sellkit / includes / contact-segmentation / conditions / cart-subtotal.php

cart-subtotal.php in SellKit – Funnel builder and checkout optimizer for WooCommerce to sell more, faster 1.3.2, at includes/contact-segmentation/conditions/cart-subtotal.php

70 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Sellkit\Contact_Segmentation\Conditions;
4
5 use Sellkit\Contact_Segmentation\Conditions\Condition_Base;
6
7 defined( 'ABSPATH' ) || die();
8
9 /**
10 * Class Cart Subtotal.
11 *
12 * @package Sellkit\Contact_Segmentation\Conditions
13 * @since 1.1.0
14 */
15 class Cart_Subtotal extends Condition_Base {
16
17 /**
18 * Condition name.
19 *
20 * @since 1.1.0
21 */
22 public function get_name() {
23 return 'cart-subtotal';
24 }
25
26 /**
27 * Condition title.
28 *
29 * @since 1.1.0
30 */
31 public function get_title() {
32 return __( 'Cart Subtotal', 'sellkit' );
33 }
34
35 /**
36 * Condition type.
37 *
38 * @since 1.1.0
39 */
40 public function get_type() {
41 return [
42 'less-than' => self::SELLKIT_NUMBER_CONDITION_VALUE,
43 'greater-than' => self::SELLKIT_NUMBER_CONDITION_VALUE,
44 'threshold-range' => 'threshold-range-field',
45 ];
46 }
47
48 /**
49 * Gets value.
50 *
51 * @since 1.1.0
52 */
53 public function get_value() {
54 if ( ! sellkit()->has_valid_dependencies() ) {
55 return '';
56 }
57
58 return wc()->cart->get_subtotal();
59 }
60
61 /**
62 * It is pro feature or not.
63 *
64 * @since 1.1.0
65 */
66 public function is_pro() {
67 return true;
68 }
69 }
70