| Server IP : 172.67.147.195 / Your IP : 216.73.216.142 Web Server : Apache/2 System : Linux hosting8537.lvs 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 User : mienphi ( 1014) PHP Version : 8.2.14 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/mienphi/public_html/wp-content/plugins/learnpress/templates/profile/tabs/orders/ |
Upload File : |
<?php
/**
* Template for displaying list orders in orders tab of user profile page.
*
* This template can be overridden by copying it to yourtheme/learnpress/orders/list.php.
*
* @author ThimPress
* @package Learnpress/Templates
* @version 4.0.1
*/
use LearnPress\Helpers\Template;
defined( 'ABSPATH' ) || exit();
$profile = LP_Profile::instance();
$query_orders = $profile->query_orders( array( 'fields' => 'ids' ) );
if ( ! $query_orders->get_items() ) {
Template::print_message( __( 'No orders!', 'learnpress' ), 'info' );
return;
}
?>
<h3 class="profile-heading"><?php esc_html_e( 'My Orders', 'learnpress' ); ?></h3>
<table class="lp-list-table profile-list-orders profile-list-table">
<thead>
<tr class="order-row">
<th class="column-order-number"><?php esc_html_e( 'Order', 'learnpress' ); ?></th>
<th class="column-order-total"><?php esc_html_e( 'Total', 'learnpress' ); ?></th>
<th class="column-order-status"><?php esc_html_e( 'Status', 'learnpress' ); ?></th>
<th class="column-order-date"><?php esc_html_e( 'Date', 'learnpress' ); ?></th>
<th class="column-order-actions"><?php esc_html_e( 'Actions', 'learnpress' ); ?></th>
</tr>
</thead>
<tbody>
<?php
foreach ( $query_orders->get_items() as $order_id ) {
$order = learn_press_get_order( $order_id );
?>
<tr class="order-row">
<td class="column-order-number">
<a href="<?php echo esc_html( $order->get_view_order_url() ); ?>">
<?php echo esc_html( $order->get_order_number() ); ?>
</a>
</td>
<td class="column-order-total"><?php echo esc_html( $order->get_formatted_order_total() ); ?></td>
<td class="column-order-status">
<span class="lp-label label-<?php echo esc_attr( $order->get_status() ); ?>">
<?php echo wp_kses_post( $order->get_order_status_html() ); ?>
</span>
</td>
<td class="column-order-date"><?php echo esc_html( $order->get_order_date() ); ?></td>
<td class="column-order-actions">
<?php
$actions = $order->get_profile_order_actions();
if ( $actions ) {
foreach ( $actions as $action ) {
printf( '<a href="%s">%s</a>', esc_url_raw( $action['url'] ), $action['text'] );
}
}
?>
</td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr class="list-table-nav">
<td colspan="3" class="nav-text"><?php echo esc_html( $query_orders->get_offset_text() ); ?></td>
<td colspan="2" class="nav-pages"><?php $query_orders->get_nav_numbers( true ); ?></td>
</tr>
</tfoot>
</table>