dashboard.php
2 years ago
downloads.php
2 years ago
form-add-payment-method.php
2 years ago
form-edit-account.php
2 years ago
form-edit-address.php
2 years ago
form-login.php
2 years ago
form-lost-password.php
2 years ago
form-reset-password.php
2 years ago
lost-password-confirmation.php
2 years ago
my-account.php
2 years ago
my-address.php
2 years ago
my-downloads.php
2 years ago
my-orders.php
5 years ago
navigation.php
2 years ago
orders.php
2 years ago
payment-methods.php
2 years ago
view-order.php
2 years ago
my-downloads.php
53 lines
| 1 | <?php |
| 2 | /** |
| 3 | * My Downloads - Deprecated |
| 4 | * |
| 5 | * Shows downloads on the account page. |
| 6 | * |
| 7 | * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-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://woo.com/document/template-structure/ |
| 16 | * @package WooCommerce\Templates |
| 17 | * @version 2.0.0 |
| 18 | * @deprecated 2.6.0 |
| 19 | */ |
| 20 | |
| 21 | defined( 'ABSPATH' ) || exit; |
| 22 | |
| 23 | $downloads = WC()->customer->get_downloadable_products(); |
| 24 | |
| 25 | if ( $downloads ) : ?> |
| 26 | |
| 27 | <?php do_action( 'woocommerce_before_available_downloads' ); ?> |
| 28 | |
| 29 | <h2><?php echo apply_filters( 'woocommerce_my_account_my_downloads_title', esc_html__( 'Available downloads', 'woocommerce' ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></h2> |
| 30 | |
| 31 | <ul class="woocommerce-Downloads digital-downloads"> |
| 32 | <?php foreach ( $downloads as $download ) : ?> |
| 33 | <li> |
| 34 | <?php |
| 35 | do_action( 'woocommerce_available_download_start', $download ); |
| 36 | |
| 37 | if ( is_numeric( $download['downloads_remaining'] ) ) { |
| 38 | /* translators: %s product name */ |
| 39 | echo apply_filters( 'woocommerce_available_download_count', '<span class="woocommerce-Count count">' . sprintf( _n( '%s download remaining', '%s downloads remaining', $download['downloads_remaining'], 'woocommerce' ), $download['downloads_remaining'] ) . '</span> ', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 40 | } |
| 41 | |
| 42 | echo apply_filters( 'woocommerce_available_download_link', '<a href="' . esc_url( $download['download_url'] ) . '">' . $download['download_name'] . '</a>', $download ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 43 | |
| 44 | do_action( 'woocommerce_available_download_end', $download ); |
| 45 | ?> |
| 46 | </li> |
| 47 | <?php endforeach; ?> |
| 48 | </ul> |
| 49 | |
| 50 | <?php do_action( 'woocommerce_after_available_downloads' ); ?> |
| 51 | |
| 52 | <?php endif; ?> |
| 53 |