Code Duplication    Length = 21-23 lines in 2 locations

includes/fields/class-gravityview-field-payment-date.php 1 location

@@ 9-31 (lines=23) @@
6
 * @since 1.16
7
 */
8
9
class GravityView_Field_Payment_Date extends GravityView_Field_Date_Created {
10
11
	var $name = 'payment_date';
12
13
	var $is_searchable = true;
14
15
	var $search_operators = array( 'less_than', 'greater_than', 'is', 'isnot' );
16
17
	var $group = 'pricing';
18
19
	var $_custom_merge_tag = 'payment_date';
20
21
	/**
22
	 * GravityView_Field_Date_Created constructor.
23
	 */
24
	public function __construct() {
25
26
		parent::__construct();
27
28
		$this->label = esc_attr__( 'Payment Date', 'gravityview' );
29
		$this->description = esc_attr__( 'The date the payment was received.', 'gravityview' );
30
	}
31
}
32
33
new GravityView_Field_Payment_Date;
34

includes/fields/class-gravityview-field-payment-status.php 1 location

@@ 9-29 (lines=21) @@
6
 * @since 1.16
7
 */
8
9
class GravityView_Field_Payment_Status extends GravityView_Field {
10
11
	var $name = 'payment_status';
12
13
	var $is_searchable = true;
14
15
	var $search_operators = array( 'is', 'in', 'not in', 'isnot' );
16
17
	var $group = 'pricing';
18
19
	var $_custom_merge_tag = 'payment_status';
20
21
	/**
22
	 * GravityView_Field_Payment_Status constructor.
23
	 */
24
	public function __construct() {
25
		$this->label = esc_html__( 'Payment Status', 'gravityview' );
26
		$this->description = esc_html__('The current payment status of the entry (ie "Processing", "Failed", "Cancelled", "Approved").', 'gravityview' );
27
		parent::__construct();
28
	}
29
}
30
31
new GravityView_Field_Payment_Status;
32