Displays the number of products downloaded by customers.
Author: | Katsushi Kawamori (profile at wordpress.org) |
WordPress version required: | 4.6 |
WordPress version tested: | 6.5.2 |
Plugin version: | 1.19 |
Added to WordPress repository: | 20-10-2020 |
Last updated: | 03-03-2024 |
Rating, %: | 0 |
Rated by: | 0 |
Plugin URI: | https://wordpress.org/plugins/download-count-... |
Total downloads: | 2 231 |
Active installs: | 10+ |
Click to start download |
Displays the number of products downloaded by customers.
Products
- The download count is displayed below the price of the product.
- The count is the total number of products downloaded.
Admin panel for products
- The download count is displayed in the “Downloads” column of the “All products” page in the admin page.
- The count is the total number of products downloaded.
Admin panel for orders
- The download count is displayed in the “Products : Downloads” column of the “Orders” page in the admin page.
- The count will be narrowed down by the product id and order id.
Option
- There is an option to “Displayed on the administration screen only”, which can be set from the management screen.
Filter
- Provide a filter to download count html for product.
Filter sample
- Modifies the HTML for All Products.
/** ==================================================
* Download Count for WooCommerce
*
* download_count_woo
* @param string $html html.
* @param int $count count.
*/
function download_countproduct( $html, $count ) {
$html = '<br /><span style="color: green;">' . $count . ' ' . __( 'Downloads', 'woocommerce' ) . '</span>';
return $html;
}
add_filter( 'download_count_woo', 'download_countproduct', 10, 2 );
- Modifies the HTML for Product ID 331.
/** ==================================================
* Download Count for WooCommerce
*
* download_count_woo_
* @param string $html html.
* @param int $count count.
*/
function download_countproduct_331( $html, $count ) {
$html = '<br /><span style="color: red;">' . $count . ' ' . __( 'Downloads', 'woocommerce' ) . '</span>';
return $html;
}
add_filter( 'download_count_woo_331', 'download_countproduct_331', 10, 2 );
Screenshots
FAQ
ChangeLog