PageRenderTime 47ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/templates/myaccount/my-account.php

https://github.com/CammoKing/woocommerce
PHP | 55 lines | 28 code | 20 blank | 7 comment | 3 complexity | bcb27f79b8ee4b3a488ed0893eb65e84 MD5 | raw file
Possible License(s): GPL-3.0
  1. <?php
  2. /**
  3. * My Account page
  4. *
  5. * @author WooThemes
  6. * @package WooCommerce/Templates
  7. * @version 1.6.4
  8. */
  9. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
  10. global $woocommerce;
  11. $woocommerce->show_messages(); ?>
  12. <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>
  13. <?php do_action( 'woocommerce_before_my_account' ); ?>
  14. <?php if ( $downloads = $woocommerce->customer->get_downloadable_products() ) : ?>
  15. <h2><?php _e( 'Available downloads', 'woocommerce' ); ?></h2>
  16. <ul class="digital-downloads">
  17. <?php foreach ( $downloads as $download ) : ?>
  18. <li>
  19. <?php
  20. do_action( 'woocommerce_available_download_start', $download );
  21. if ( is_numeric( $download['downloads_remaining'] ) )
  22. 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 );
  23. echo apply_filters( 'woocommerce_available_download_link', '<a href="' . esc_url( $download['download_url'] ) . '">' . $download['download_name'] . '</a>', $download );
  24. do_action( 'woocommerce_available_download_end', $download );
  25. ?>
  26. </li>
  27. <?php endforeach; ?>
  28. </ul>
  29. <?php endif; ?>
  30. <h2><?php _e( 'Recent Orders', 'woocommerce' ); ?></h2>
  31. <?php woocommerce_get_template( 'myaccount/my-orders.php', array( 'recent_orders' => $recent_orders ) ); ?>
  32. <h2><?php _e( 'My Address', 'woocommerce' ); ?></h2>
  33. <p class="myaccount_address"><?php _e( 'The following addresses will be used on the checkout page by default.', 'woocommerce' ); ?></p>
  34. <?php woocommerce_get_template( 'myaccount/my-address.php' ); ?>
  35. <?php do_action( 'woocommerce_after_my_account' ); ?>