Code Duplication    Length = 5-5 lines in 2 locations

includes/admin/payments/view-payment-details.php 1 location

@@ 443-447 (lines=5) @@
440
														_e( 'n/a', 'give' );
441
													} else {
442
														$prices_atts = array();
443
														if ( $variable_prices = give_get_variable_prices( $payment_meta['form_id'] ) ) {
444
															foreach ( $variable_prices as $variable_price ) {
445
																$prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'], array( 'sanitize' => false ) );
446
															}
447
														}
448
														// Variable price dropdown options.
449
														$variable_price_dropdown_option = array(
450
															'id'               => $payment_meta['form_id'],

includes/ajax-functions.php 1 location

@@ 632-636 (lines=5) @@
629
		esc_html_e( 'n/a', 'give' );
630
	} else {
631
		$prices_atts = array();
632
		if ( $variable_prices = give_get_variable_prices( $form_id ) ) {
633
			foreach ( $variable_prices as $variable_price ) {
634
				$prices_atts[ $variable_price['_give_id']['level_id'] ] = give_format_amount( $variable_price['_give_amount'], array( 'sanitize' => false ) );
635
			}
636
		}
637
638
		// Variable price dropdown options.
639
		$variable_price_dropdown_option = array(