2011-12-09 17:01:56 +00:00
< ? php
/**
2012-08-14 18:05:45 +00:00
* My Account page
*
* @ author WooThemes
* @ package WooCommerce / Templates
* @ version 1.6 . 4
2011-12-09 17:01:56 +00:00
*/
2012-08-14 18:05:45 +00:00
2012-10-15 10:57:58 +00:00
if ( ! defined ( 'ABSPATH' ) ) exit ; // Exit if accessed directly
2012-02-03 16:17:35 +00:00
global $woocommerce ;
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +00:00
$woocommerce -> show_messages (); ?>
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +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>
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +00:00
< ? php do_action ( 'woocommerce_before_my_account' ); ?>
< ? php if ( $downloads = $woocommerce -> customer -> get_downloadable_products () ) : ?>
< h2 >< ? php _e ( 'Available downloads' , 'woocommerce' ); ?> </h2>
2011-12-09 17:01:56 +00:00
< ul class = " digital-downloads " >
2012-10-09 13:00:08 +00:00
< ? php foreach ( $downloads as $download ) : ?>
2012-11-27 16:22:47 +00:00
2012-10-09 13:00:08 +00:00
< li >
2012-11-27 16:22:47 +00:00
< ? php
2012-10-09 13:00:08 +00:00
do_action ( 'woocommerce_available_download_start' , $download );
if ( is_numeric ( $download [ 'downloads_remaining' ] ) )
echo apply_filters ( 'woocommerce_available_download_count' , '<span class="count">' . sprintf ( _n ( '%s download remaining' , '%s downloads remaining' , $download [ 'downloads_remaining' ], 'woocommerce' ), $download [ 'downloads_remaining' ] ) . '</span> ' , $download );
2012-11-27 16:22:47 +00:00
2012-10-09 13:00:08 +00:00
echo apply_filters ( 'woocommerce_available_download_link' , '<a href="' . esc_url ( $download [ 'download_url' ] ) . '">' . $download [ 'download_name' ] . '</a>' , $download );
2012-11-27 16:22:47 +00:00
do_action ( 'woocommerce_available_download_end' , $download );
2012-10-09 13:00:08 +00:00
?>
</ li >
2012-11-27 16:22:47 +00:00
2011-12-09 17:01:56 +00:00
< ? php endforeach ; ?>
</ ul >
2012-10-09 13:00:08 +00:00
2012-08-14 18:05:45 +00:00
< ? php endif ; ?>
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +00:00
< h2 >< ? php _e ( 'Recent Orders' , 'woocommerce' ); ?> </h2>
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +00:00
< ? php woocommerce_get_template ( 'myaccount/my-orders.php' , array ( 'recent_orders' => $recent_orders ) ); ?>
2011-12-09 17:01:56 +00:00
2012-10-09 13:00:08 +00:00
< h2 >< ? php _e ( 'My Address' , 'woocommerce' ); ?> </h2>
< p class = " myaccount_address " >< ? php _e ( 'The following addresses will be used on the checkout page by default.' , 'woocommerce' ); ?> </p>
< ? php woocommerce_get_template ( 'myaccount/my-address.php' ); ?>
< ? php do_action ( 'woocommerce_after_my_account' ); ?>