/** * Setup the registration details * * @since 2.5 */ function rcp_calc_total_ajax() { $return = array('valid' => false, 'total' => __('No available subscription levels for your account.', 'rcp')); if (!rcp_is_registration()) { wp_send_json($return); } ob_start(); rcp_get_template_part('register-total-details'); $return['total'] = ob_get_clean(); wp_send_json($return); }
/** * Get the recurring total payment * * @since 2.5 * @return bool|Int */ function rcp_get_registration_recurring_total() { if (!rcp_is_registration()) { return false; } return rcp_get_registration()->get_recurring_total(); }
<?php if (!rcp_is_registration()) { return; } ?> <table class="rcp_registration_total_details rcp-table"> <tbody style="vertical-align: top;"> <tr> <th><?php _e('Subscription', 'rcp'); ?> </th> <th><?php _e('Amount', 'rcp'); ?> </th> </tr> <tr> <td><?php echo rcp_get_subscription_name(rcp_get_registration()->get_subscription()); ?> </td> <td><?php echo rcp_get_subscription_price(rcp_get_registration()->get_subscription()) > 0 ? rcp_currency_filter(number_format(rcp_get_subscription_price(rcp_get_registration()->get_subscription()), rcp_currency_decimal_filter())) : __('free', 'rcp'); ?> </td>