Code Duplication    Length = 19-19 lines in 2 locations

includes/class-give-donate-form.php 2 locations

@@ 539-557 (lines=19) @@
536
	 *
537
	 * @return float  Minimum price.
538
	 */
539
	public function get_minimum_price() {
540
541
		if ( ! isset( $this->minimum_price ) ) {
542
543
			$this->minimum_price = give_get_meta( $this->ID, '_give_custom_amount_range_minimum', true );
544
545
			// Give backward < 2.1
546
			if ( empty( $this->minimum_price ) ) {
547
				$this->minimum_price = give_get_meta( $this->ID, '_give_custom_amount_minimum', true );
548
			}
549
550
			if ( ! $this->is_custom_price_mode() ) {
551
				$this->minimum_price = 0;
552
			}
553
554
		}
555
556
		return apply_filters( 'give_get_set_minimum_price', $this->minimum_price, $this->ID );
557
	}
558
559
	/**
560
	 * Retrieve the maximum price.
@@ 647-665 (lines=19) @@
644
	 *
645
	 * @return float  Goal.
646
	 */
647
	public function get_goal() {
648
649
		if ( ! isset( $this->goal ) ) {
650
651
			if ( 'donation' === give_get_form_goal_format( $this->ID ) ) {
652
				$this->goal = give_get_meta( $this->ID, '_give_number_of_donation_goal', true );
653
			} else {
654
				$this->goal = give_get_meta( $this->ID, '_give_set_goal', true );
655
			}
656
657
			if ( ! $this->goal ) {
658
				$this->goal = 0;
659
			}
660
661
		}
662
663
		return apply_filters( 'give_get_set_goal', $this->goal, $this->ID );
664
665
	}
666
667
	/**
668
	 * Determine if single price mode is enabled or disabled