dashboard.php
5 years ago
downloads.php
5 years ago
form-add-payment-method.php
3 years ago
form-edit-account.php
3 years ago
form-edit-address.php
3 years ago
form-login.php
3 years ago
form-lost-password.php
3 years ago
form-reset-password.php
3 years ago
lost-password-confirmation.php
5 years ago
my-account.php
5 years ago
my-address.php
5 years ago
my-downloads.php
5 years ago
my-orders.php
5 years ago
navigation.php
5 years ago
orders.php
3 years ago
payment-methods.php
5 years ago
view-order.php
5 years ago
downloads.php
47 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Downloads |
| 4 | * |
| 5 | * Shows downloads on the account page. |
| 6 | * |
| 7 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/downloads.php. |
| 8 | * |
| 9 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 10 | * (the theme developer) will need to copy the new files to your theme to |
| 11 | * maintain compatibility. We try to do this as little as possible, but it does |
| 12 | * happen. When this occurs the version of the template file will be bumped and |
| 13 | * the readme will list any important changes. |
| 14 | * |
| 15 | * @see https://docs.woocommerce.com/document/template-structure/ |
| 16 | * @package WooCommerce\Templates |
| 17 | * @version 3.2.0 |
| 18 | */ |
| 19 | |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; |
| 22 | } |
| 23 | |
| 24 | $downloads = WC()->customer->get_downloadable_products(); |
| 25 | $has_downloads = (bool) $downloads; |
| 26 | |
| 27 | do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?> |
| 28 | |
| 29 | <?php if ( $has_downloads ) : ?> |
| 30 | |
| 31 | <?php do_action( 'woocommerce_before_available_downloads' ); ?> |
| 32 | |
| 33 | <?php do_action( 'woocommerce_available_downloads', $downloads ); ?> |
| 34 | |
| 35 | <?php do_action( 'woocommerce_after_available_downloads' ); ?> |
| 36 | |
| 37 | <?php else : ?> |
| 38 | <div class="woocommerce-Message woocommerce-Message--info woocommerce-info"> |
| 39 | <a class="woocommerce-Button button" href="<?php echo esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>"> |
| 40 | <?php esc_html_e( 'Browse products', 'woocommerce' ); ?> |
| 41 | </a> |
| 42 | <?php esc_html_e( 'No downloads available yet.', 'woocommerce' ); ?> |
| 43 | </div> |
| 44 | <?php endif; ?> |
| 45 | |
| 46 | <?php do_action( 'woocommerce_after_account_downloads', $has_downloads ); ?> |
| 47 |