- Python 3
- Pip 3
$ brew install python3
function direct_free_downloads_button($button) | |
{ | |
global $product; | |
if( $product->is_downloadable() AND $product->get_price() == 0 ) | |
{ | |
$files = $product->get_files(); | |
$files = array_keys($files); | |
$download_url = home_url('?download_file='.$product->id.'&key='.$files[0].'&free=1' ); |
<?php | |
/** | |
* | |
* This is used to regsiter a custom post type, custom taxonomy and provide template redirecting. | |
* | |
* This abstract class defines some base functions for using Custom Post Types. You should not have to | |
* edit this abstract, only add additional methods if need be. You must use what is provided for you | |
* in the interface. | |
* | |
*/ |