moved woocommerce_get_filename_from_url to core-functions as it is required in admin too. Closes #2949
This commit is contained in:
parent
6924817c22
commit
47143bcffb
|
@ -167,6 +167,7 @@ Yes you can! Join in on our [GitHub repository](http://github.com/woothemes/wooc
|
|||
|
||||
= X =
|
||||
* Tweak - Support for the city field in shipping calc (filterable)
|
||||
* Fix - moved woocommerce_get_filename_from_url to core-functions as it is required in admin too.
|
||||
|
||||
= 2.0.7 - 12/04/2013 =
|
||||
* Feature - Option for GA _setDomainName.
|
||||
|
|
|
@ -1288,6 +1288,17 @@ function woocommerce_downloadable_file_permission( $download_id, $product_id, $o
|
|||
if ( get_option('woocommerce_downloads_grant_access_after_payment') == 'yes' )
|
||||
add_action( 'woocommerce_order_status_processing', 'woocommerce_downloadable_product_permissions' );
|
||||
|
||||
/**
|
||||
* Gets the filename part of a download URL
|
||||
*
|
||||
* @access public
|
||||
* @param string $file_url
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_get_filename_from_url( $file_url ) {
|
||||
$parts = parse_url( $file_url );
|
||||
return basename( $parts['path'] );
|
||||
}
|
||||
|
||||
/**
|
||||
* Order Status completed - This is a paying customer
|
||||
|
|
|
@ -1723,15 +1723,3 @@ function woocommerce_save_address() {
|
|||
}
|
||||
|
||||
add_action( 'template_redirect', 'woocommerce_save_address' );
|
||||
|
||||
/**
|
||||
* Gets the filename part of a download URL
|
||||
*
|
||||
* @access public
|
||||
* @param string $file_url
|
||||
* @return string
|
||||
*/
|
||||
function woocommerce_get_filename_from_url( $file_url ) {
|
||||
$parts = parse_url( $file_url );
|
||||
return basename( $parts['path'] );
|
||||
}
|
Loading…
Reference in New Issue