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;
defined( 'ABSPATH' ) || exit;
/** * @class Review_Rating */ class Review_Rating extends Abstract_Number {
public $data_item = 'review';
public $support_floats = false;
function init() { $this->title = __( 'Review - Rating', 'automatewoo' ); }
/** * @param $review \AutomateWoo\Review * @param $compare * @param $value * @return bool */ function validate( $review, $compare, $value ) { return $this->validate_number( $review->get_rating(), $compare, $value ); }
}
|