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 // phpcs:ignoreFile
namespace AutomateWoo\Rules;
use WC_Order;
defined( 'ABSPATH' ) || exit;
/** * OrderShippingMethodString rule class. */ class OrderShippingMethodString extends Abstract_String {
public $data_item = 'order';
function init() { $this->title = __( 'Order - Shipping Method - Text Match', 'automatewoo' ); }
/** * @param WC_Order $order * @param $compare * @param $value * @return bool */ function validate( $order, $compare, $value ) { return $this->validate_string( $order->get_shipping_method(), $compare, $value ); }
}
|