I am looking for advice on how to expand invoice details using the Restrict Content Pro Wordpress plugin. I'm unsure on how to go about showing the breakdown of a subscription level on an invoice. I've hit a learning curve with figuring this out with their code. I've attached the invoice.php, how do I tackle this?
My connumdrum: I have a subscription that is 295$. The breakdown is: Membership fee - 195$, Insurance Policy - 100$. I just need to show the breakdown, it's probably super simple.
I did try just putting a ul tag and just list the breakdown with li tags. But, that would cause confusion because it would show up all invoices with different levels.
Invoice Code:
<body>
<div id="main">
<header id="header">
<!-- Logo -->
<div class="logo">
<?php if ( ! empty( $rcp_options['invoice_logo'] ) ) : ?>
<img src="<?php echo esc_attr( $rcp_options['invoice_logo'] ); ?>" />
<?php endif; ?>
</div>
<!-- Invoice Details -->
<div class="alignright">
<h1><?php printf( __( 'Invoice %s', 'rcp' ), $rcp_payment->id ); ?> </h1>
</div>
<?php if( ! empty( $rcp_options['invoice_header'] ) ) : ?>
<p><?php echo $rcp_options['invoice_header']; ?></p>
<?php endif; ?>
</header>
<section id="contacts">
<div class="alignleft">
<header><?php printf( __( 'Invoice %s', 'rcp' ), $rcp_payment->id ); ?></header>
<article>
<?php if ( ! empty( $rcp_options['invoice_company'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_company']; ?></strong></p>
<?php endif; ?>
<?php if ( ! empty( $rcp_options['invoice_name'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_name']; ?></strong></p>
<?php endif; ?>
<?php if ( ! empty( $rcp_options['invoice_address'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_address']; ?></strong></p>
<?php endif; ?>
<?php if ( ! empty( $rcp_options['invoice_address_2'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_address_2']; ?></strong></p>
<?php endif; ?>
<?php if ( ! empty( $rcp_options['invoice_city_state_zip'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_city_state_zip']; ?></strong></p>
<?php endif; ?>
<?php if ( ! empty( $rcp_options['invoice_email'] ) ) : ?>
<p><strong><?php echo $rcp_options['invoice_email']; ?></strong></p>
<?php endif; ?>
</article>
</div>
<div class="alignright">
<header><?php _e( 'Bill To:', 'rcp' ); ?></header>
<article>
<p><strong><?php echo $rcp_member->first_name . ' ' . $rcp_member->last_name; ?></strong></p>
<p><strong><?php echo $rcp_member->user_email; ?></strong></p>
<?php
/**
* Insert content after the member's name and email.
*
* @param object $rcp_payment Payment object from the database.
* @param RCP_Member $rcp_member Member object.
*/
do_action( 'rcp_invoice_bill_to', $rcp_payment, $rcp_member );
?>
</article>
</div>
</section>
<!-- Items -->
<section id="items">
<header><?php _e( 'Invoice Items:', 'rcp' ); ?></header>
<table>
<tbody>
<tr>
<td class="name"><?php echo $rcp_payment->subscription; ?></td>
<td class="price"><?php echo rcp_currency_filter( $rcp_payment->amount ); ?></td>
</tr>
<?php do_action( 'rcp_invoice_items', $rcp_payment ); ?>
</tbody>
<tfoot>
<?php do_action( 'rcp_invoice_items_before_total_price', $rcp_payment ); ?>
<!-- Total -->
<tr>
<td class="name"><?php _e( 'Total Price:', 'rcp' ); ?></td>
<td class="price"><?php echo rcp_currency_filter( $rcp_payment->amount ); ?></td>
</tr>
<!-- Paid -->
<tr>
<td class="name"><?php _e( 'Payment Status:', 'rcp' ); ?></td>
<td class="price"><?php echo rcp_get_payment_status_label( $rcp_payment ); ?></td>
</tr>
</tfoot>
</table>
</section>
<!-- Additional Info -->
<section id="additional-info">
<div class="alignleft">
<header><?php _e( 'Additional Info:', 'rcp' ); ?></header>
<article>
<p><?php echo __( 'Payment Date:', 'rcp' ) . ' ' . date_i18n( get_option( 'date_format' ), strtotime( $rcp_payment->date, current_time( 'timestamp' ) ) ); ?></p>
</article>
<?php if( ! empty( $rcp_options['invoice_notes'] ) ) : ?>
<article>
<?php echo wpautop( wp_kses_post( $rcp_options['invoice_notes'] ) ); ?>
</article>
<?php endif; ?>
<?php do_action( 'rcp_invoice_additional_info', $rcp_payment ); ?>
</div>
</section>
<?php do_action( 'rcp_invoice_after_additional_info', $rcp_payment ); ?>
<footer id="footer">
<?php if( ! empty( $rcp_options['invoice_footer'] ) ) : ?>
<p><?php echo $rcp_options['invoice_footer']; ?></p>
<?php endif; ?>
<p class="print alignright"><a href="#" onclick="window.print()"><?php _e( 'Print', 'rcp' ); ?></a></p>
</footer>
</div>