woocommerce/templates/myaccount/my-account.php

32 lines
1.5 KiB
PHP
Raw Normal View History

<?php
/**
* My Account
*/
2012-02-03 16:17:35 +00:00
global $woocommerce;
?>
<?php $woocommerce->show_messages(); ?>
2012-06-05 23:40:16 +00:00
<p class="myaccount_user"><?php printf( __('Hello, <strong>%s</strong>. From your account dashboard you can view your recent orders, manage your shipping and billing addresses and <a href="%s">change your password</a>.', 'woocommerce'), $current_user->display_name, get_permalink(woocommerce_get_page_id('change_password'))); ?></p>
<?php do_action('woocommerce_before_my_account'); ?>
<?php if ($downloads = $woocommerce->customer->get_downloadable_products()) : ?>
2012-01-05 11:31:22 +00:00
<h2><?php _e('Available downloads', 'woocommerce'); ?></h2>
<ul class="digital-downloads">
<?php foreach ($downloads as $download) : ?>
2012-01-12 15:28:02 +00:00
<li><?php if (is_numeric($download['downloads_remaining'])) : ?><span class="count"><?php echo $download['downloads_remaining'] . _n(' download Remaining', ' downloads remaining', $download['downloads_remaining'], 'woocommerce'); ?></span><?php endif; ?> <a href="<?php echo esc_url( $download['download_url'] ); ?>"><?php echo $download['download_name']; ?></a></li>
<?php endforeach; ?>
</ul>
<?php endif; ?>
2012-01-05 11:31:22 +00:00
<h2><?php _e('Recent Orders', 'woocommerce'); ?></h2>
<?php woocommerce_get_template('myaccount/my-orders.php', array( 'recent_orders' => $recent_orders )); ?>
<h2><?php _e('My Address', 'woocommerce'); ?></h2>
2012-06-05 23:40:16 +00:00
<p class="myaccount_address"><?php _e('The following addresses will be used on the checkout page by default.', 'woocommerce'); ?></p>
2012-02-22 21:06:08 +00:00
<?php woocommerce_get_template('myaccount/my-address.php'); ?>
<?php
do_action('woocommerce_after_my_account');