Lines:
1 to 65 of 65
<?php if( ! empty( $_GET['edd-verify-success'] ) ) : ?> <p class="edd-account-verified edd_success"> <?php _e( 'Your account has been successfully verified!', 'easy-digital-downloads' ); ?> </p> <?php endif; /** * This template is used to display the purchase history of the current user. */ if ( is_user_logged_in() ): $payments = edd_get_users_purchases( get_current_user_id(), 20, true, 'any' ); if ( $payments ) : do_action( 'edd_before_purchase_history', $payments ); ?> <table id="edd_user_history" class="edd-table"> <thead> <tr class="edd_purchase_row"> <?php do_action('edd_purchase_history_header_before'); ?> <th class="edd_purchase_id"><?php _e('ID','easy-digital-downloads' ); ?></th> <th class="edd_purchase_date"><?php _e('Date','easy-digital-downloads' ); ?></th> <th class="edd_purchase_amount"><?php _e('Amount','easy-digital-downloads' ); ?></th> <th class="edd_purchase_details"><?php _e('Details','easy-digital-downloads' ); ?></th> <?php do_action('edd_purchase_history_header_after'); ?> </tr> </thead> <?php foreach ( $payments as $payment ) : ?> <?php $payment = new EDD_Payment( $payment->ID ); ?> <tr class="edd_purchase_row"> <?php do_action( 'edd_purchase_history_row_start', $payment->ID, $payment->payment_meta ); ?> <td class="edd_purchase_id">#<?php echo $payment->number ?></td> <td class="edd_purchase_date"><?php echo date_i18n( get_option('date_format'), strtotime( $payment->date ) ); ?></td> <td class="edd_purchase_amount"> <span class="edd_purchase_amount"><?php echo edd_currency_filter( edd_format_amount( $payment->total ) ); ?></span> </td> <td class="edd_purchase_details"> <?php if( $payment->status != 'publish' ) : ?> <span class="edd_purchase_status <?php echo $payment->status; ?>"><?php echo $payment->status_nicename; ?></span> <?php if ( $payment->is_recoverable() ) : ?> — <a href="<?php echo $payment->get_recovery_url(); ?>"><?php _e( 'Complete Purchase', 'easy-digital-downloads' ); ?></a> <?php endif; ?> <?php else: ?> <a href="<?php echo esc_url( add_query_arg( 'payment_key', $payment->key, edd_get_success_page_uri() ) ); ?>"><?php _e( 'View Details and Downloads', 'easy-digital-downloads' ); ?></a> <?php endif; ?> </td> <?php do_action( 'edd_purchase_history_row_end', $payment->ID, $payment->payment_meta ); ?> </tr> <?php endforeach; ?> </table> <?php echo edd_pagination( array( 'type' => 'purchase_history', 'total' => ceil( edd_count_purchases_of_customer() / 20 ) // 20 items per page ) ); ?> <?php do_action( 'edd_after_purchase_history', $payments ); ?> <?php wp_reset_postdata(); ?> <?php else : ?> <p class="edd-no-purchases"><?php _e('You have not made any purchases','easy-digital-downloads' ); ?></p> <?php endif; endif;
Called by
Invoked by
Calls
1 to 6 of 6
- edd_count_purchases_of_customer() – Count number of purchases of a customer
- edd_currency_filter() – Formats the currency display
- edd_format_amount() – Returns a nicely formatted amount.
- edd_get_success_page_uri() – Retrieve the Success page URI
- edd_get_users_purchases() – Get Users Purchases
- edd_pagination() – Build pagination