/var/www/html_uk/wp-content/plugins/automatewoo/includes/Rules/Order_Item_Subtotal.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php

namespace AutomateWoo\Rules;

defined'ABSPATH' ) || exit;

/**
 * Class Order_Item_Subtotal
 *
 * @since 4.9.0
 */
class Order_Item_Subtotal extends Order_Item_Total {

    
/**
     * Init the rule.
     */
    
public function init() {
        
$this->title __'Order Line Item - Subtotal''automatewoo' );
    }

    
/**
     * Validate the rule.
     *
     * @param \WC_Order_Item_Product $item
     * @param string                 $compare
     * @param string                 $value
     *
     * @return bool
     */
    
public function validate$item$compare$value ) {
        return 
$this->validate_number$item->get_subtotal(), $compare$value );
    }
}