Remove url params from filenames on orders in backend under Downloadable Product Permissions

This commit is contained in:
Gerhard 2013-04-16 09:01:50 +02:00
parent 1605c4b012
commit b172757a8e
1 changed files with 5 additions and 1 deletions

View File

@ -6,7 +6,11 @@ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
<button type="button" rel="<?php echo absint( $download->product_id ) . ',' . esc_attr( $download->download_id ); ?>" class="revoke_access button"><?php _e( 'Revoke Access', 'woocommerce' ); ?></button>
<div class="handlediv" title="<?php _e( 'Click to toggle', 'woocommerce' ); ?>"></div>
<strong>
<?php echo '#' . absint( $product->id ) . ' &mdash; ' . apply_filters( 'woocommerce_admin_download_permissions_title', $product->get_title(), $download->product_id, $download->order_id, $download->order_key, $download->download_id ) . ' &mdash; ' . sprintf( __( 'File %d: %s', 'woocommerce' ), $file_count, basename( $product->get_file_download_path( $download->download_id ) ) ) . ' &mdash; ' . sprintf( _n('Downloaded %s time', 'Downloaded %s times', absint( $download->download_count ), 'woocommerce'), absint( $download->download_count ) ); ?>
<?php
$filename_parts = parse_url( $product->get_file_download_path( $download->download_id ) );
$filename = basename( $filename_parts['path'] );
?>
<?php echo '#' . absint( $product->id ) . ' &mdash; ' . apply_filters( 'woocommerce_admin_download_permissions_title', $product->get_title(), $download->product_id, $download->order_id, $download->order_key, $download->download_id ) . ' &mdash; ' . sprintf( __( 'File %d: %s', 'woocommerce' ), $file_count, $filename ) . ' &mdash; ' . sprintf( _n('Downloaded %s time', 'Downloaded %s times', absint( $download->download_count ), 'woocommerce'), absint( $download->download_count ) ); ?>
</strong>
</h3>
<table cellpadding="0" cellspacing="0" class="wc-metabox-content">