Code Duplication    Length = 4-7 lines in 2 locations

includes/class-wcs-shortcodes.php 2 locations

@@ 406-412 (lines=7) @@
403
		// Get Subscription Discount - Only available with the WooCommerce extension "Subscribe to All the Things".
404
		$scheme = self::get_satt_lowest_scheme_data( $product_data );
405
406
		if ( !empty( $scheme ) && is_array( $scheme ) ) {
407
			// Override price?
408
			$override = $scheme['scheme']['subscription_pricing_method'];
409
410
			// Discount ?
411
			$discount = $scheme['scheme']['subscription_discount'];
412
		}
413
414
		if ( ! empty( $discount ) && is_numeric( $discount ) && $override == 'inherit' ) {
415
			$discount = sprintf( __( '%s%s %s', WCSS::TEXT_DOMAIN ), $discount, '%', apply_filters( 'wcs_shortcodes_sub_discount_string', __( 'discount', WCSS::TEXT_DOMAIN ) ) );
@@ 815-818 (lines=4) @@
812
		if ( empty( $trial_length ) || $trial_length != 0 ) {
813
			$scheme = self::get_satt_lowest_scheme_data( $product_data );
814
815
			if ( !empty( $scheme ) && is_array( $scheme ) ) {
816
				$trial_length = $scheme['scheme']['subscription_trial_length'];
817
				$trial_period = $scheme['scheme']['subscription_trial_period'];
818
			}
819
		}
820
821
		if ( ! empty( $trial_length ) && $trial_length > 0 ) {