Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
LLMS_Meta_Box_Voucher::redemption_section_html()
Retrieve the HTML for the redemption area.
Return Return
(string)
Source Source
File: includes/admin/post-types/meta-boxes/class.llms.meta.box.voucher.php
private function redemption_section_html() { global $post; $pid = $post->ID; $voucher = new LLMS_Voucher( $pid ); $redeemed_codes = $voucher->get_redeemed_codes(); ob_start(); ?> <div class="llms-voucher-redemption-wrapper"> <table> <thead> <tr> <th>Name</th> <th>Email</th> <th>Redemption Date</th> <th>Code</th> </tr> </thead> <tbody> <?php if ( ! empty( $redeemed_codes ) ) : foreach ( $redeemed_codes as $redeemed_code ) : $user = get_user_by( 'id', $redeemed_code->user_id ); ?> <tr> <td><?php echo $user->data->display_name; ?></td> <td><?php echo $user->data->user_email; ?></td> <td><?php echo $redeemed_code->redemption_date; ?></td> <td><?php echo $redeemed_code->code; ?></td> </tr> <?php endforeach; endif; ?> </tbody> </table> </div> <?php return ob_get_clean(); }
Expand full source code Collapse full source code View on GitHub