/**
 * Get formatted recurring total for this registration
 *
 * @since      2.5
 * @param bool $echo
 *
 * @return mixed|string|void
 */
function rcp_registration_recurring_total($echo = true)
{
    $total = rcp_get_registration_recurring_total();
    // the registration has not been setup yet
    if (false === $total) {
        return false;
    }
    if (0 < $total) {
        $total = number_format($total, rcp_currency_decimal_filter());
        $total = rcp_currency_filter($total);
        $subscription = rcp_get_subscription_details(rcp_get_registration()->get_subscription());
        if ($subscription->duration == 1) {
            $total .= '/' . rcp_filter_duration_unit($subscription->duration_unit, 1);
        } else {
            $total .= sprintf(__(' every %s %s', 'rcp'), $subscription->duration, rcp_filter_duration_unit($subscription->duration_unit, $subscription->duration));
        }
    } else {
        $total = __('free', 'rcp');
    }
    $total = apply_filters('rcp_registration_recurring_total', $total);
    if ($echo) {
        echo $total;
    }
    return $total;
}
</td>
					</tr>
				<?php 
            }
        }
        ?>

				<?php 
        // Fees
        ?>
				<?php 
        if (rcp_get_registration()->get_fees()) {
            foreach (rcp_get_registration()->get_fees() as $fee) {
                $sign = $fee['amount'] < 0 ? '-' : '';
                $fee['amount'] = abs($fee['amount']);
                $fee['amount'] = number_format($fee['amount'], rcp_currency_decimal_filter());
                ?>
					<tr class="rcp-fee">
						<td><?php 
                echo esc_html($fee['description']);
                ?>
</td>
						<td><?php 
                echo esc_html($sign . rcp_currency_filter($fee['amount']));
                ?>
</td>
					</tr>
				<?php 
            }
        }
        ?>