Creates a shortcode which can be displayed on any page to show users WooCommerce available downloads.
This plugin requires WooCommerce.
When developing a WooCommerce site I realized there was not a shortcode for displaying the logged in users available downloads outside of the My Account page. So I developed this simple plugin which adds the short code [woocommerce-my-downloads]. It is simple and effective. It displays the Date of the order and the file name in an unordered list.
** Note: WooCommerce 3.1.2 Compatible
Shortcode for displaying all downloads
Shortcode for single product download button
Can I change the template?
For right now, you can change the template by editing the /tpl/my-downloads.php file.
How do I put my downloads shortcode in my template with PHP?
Open your template file and the put in
<?php do_shortcode('[woocommerce-my-downloads]'); ?>
- Wrapped $woocommerce in check statement for corner cases when woocommerce is not loaded and fatal error occurs when saving page/post with shortcode.
- Fixed php warnings for undefined variables
- Fixed deprecated calls
- Moved away from the global $woocommerce and changed to WC()
- Cleaned up various parts of code.
- Added in new shortcode for single download button
- Options Include: ** Toggle Show Date on Template ** Ability to specify label on button ** Ability to add specific classes to button
- Confirmed working with WordPress 4.3 and WooCommerce 2.4.5
- Added in a setting panel. Go into Admin->Settings->WooCommerce My Downloads
- Options Include: ** Available Downloads Heading ** Content if user has no downloads. ** Show Downloads Remaining on Template ** Show Available Download Count on Template
- WordPress 3.9 Compatible
- WooCommerce 2.1 Compatible
= * Initial release.
- Search for plugin and install it
- Activate the plugin through the \"Plugins\" menu in WordPress.
- Place the shortcode [woocommerce-my-downloads] on any page you would like.