Code Duplication    Length = 9-11 lines in 2 locations

includes/admin/tools/logs/class-sales-logs-list-table.php 1 location

@@ 88-96 (lines=9) @@
85
86
				$value = '<div class="give-donation-status status-' . sanitize_title( give_get_payment_status( $payment, true ) ) . '"><span class="give-donation-status-icon"></span> ' . give_get_payment_status( $payment, true ) . '</div>';
87
88
				if ( $payment->mode == 'test' ) {
89
					$value .= Give()->tooltips->render_span( array(
90
						'label'       => __( 'This donation was made in test mode.', 'give' ),
91
						'tag_content' => __( 'Test', 'give' ),
92
						'attributes'  => array(
93
							'class' => 'give-item-label give-item-label-orange give-test-mode-transactions-label',
94
						),
95
					) );
96
				}
97
98
				return $value;
99

includes/admin/payments/class-payments-table.php 1 location

@@ 578-588 (lines=11) @@
575
	 */
576
	function get_payment_status( $payment ) {
577
		$value = '<div class="give-donation-status status-' . sanitize_title( give_get_payment_status( $payment, true ) ) . '"><span class="give-donation-status-icon"></span> ' . give_get_payment_status( $payment, true ) . '</div>';
578
		if ( $payment->mode == 'test' ) {
579
			$value .= Give()->tooltips->render_span( array(
580
				'label'       => __( 'This donation was made in test mode.', 'give' ),
581
				'tag_content' => __( 'Test', 'give' ),
582
				'attributes'  => array(
583
					'class' => 'give-item-label give-item-label-orange give-test-mode-transactions-label',
584
				),
585
586
587
			) );
588
		}
589
590
		if ( true === $payment->import && true === (bool) apply_filters( 'give_payment_show_importer_label', false ) ) {
591
			$value .= ' <span class="give-item-label give-item-label-orange give-test-mode-transactions-label" data-tooltip="' . __( 'This donation was imported.', 'give' ) . '">' . __( 'Import', 'give' ) . '</span>';