我正在寻找有关如何使用Restrict Content Pro Wordpress插件扩展发票详细信息的建议。我不确定如何在发票上显示订阅级别的细分。我用他们的代码弄清楚了学习的曲线。我已经附上了invoice.php,该如何解决?
我的难题:我的订阅费用为295美元。细目如下:会员费-195 $,保险单-100 $。我只需要显示细目,它可能非常简单。
我确实尝试仅放置ul标签,并列出带有li标签的细目分类。但是,这会引起混乱,因为它将显示所有具有不同级别的发票。
发票代码:
<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>