roykho
90e187b899
Tweak download filepaths
2021-09-21 12:36:52 -07:00
barryhughes
d81eee6b5a
Download handler: support falling back on the redirect method as an option.
2021-07-20 11:18:22 -07:00
barryhughes
dc3589f0e3
Revert f88586e
but add supporting logging.
2021-07-20 11:18:22 -07:00
vedanshujain
f88586eb1f
Remove download headers when file was not served.
2021-06-22 12:24:47 +05:30
Claudio Sanches
37291abc54
Added since tag in new filters introduced in 4.5
2020-08-17 18:01:41 -03:00
Claudio Sanches
d48f1d4e2e
Fixed package tag usage
2020-08-05 13:36:24 -03:00
Néstor Soriano
0f134ca6a2
Merge pull request #27054 from woocommerce/fix/27036
...
add/update correct deprecated notices on existing deprecations
2020-07-29 15:20:24 +02:00
Joel Rowley
61abc7caab
Add dockblock to the woocommerce_file_download_method filter
...
Co-authored-by: Claudio Sanches <contato@claudiosanches.com>
2020-07-28 14:28:15 -04:00
Joel Rowley
ae5bd1e14f
Add file path to woocommerce_file_download_method filter
2020-07-28 13:52:21 -04:00
Ron Rennick
5ee0eccb7b
add/update correct deprecated notices on existing deprecations
2020-07-16 17:13:08 -03:00
vedanshujain
44677bbab7
Fallback to force for remote file because xsendfile don;t support it by default
2020-02-07 17:54:54 +05:30
Claudio Sanches
42864cdfdb
Fixed coding standards
2020-01-24 15:01:12 -03:00
Claudio Sanches
86d59257f4
Introduced woocommerce_download_product_filepath filter
2020-01-24 15:00:55 -03:00
Rodrigo Primo
1f69fbcf33
get_magic_quotes_runtime() is deprecated as of PHP 7.4
...
Remove call to get_magic_quotes_runtime() as this function is deprecated
as of PHP 7.4 (see https://wiki.php.net/rfc/deprecations_php_7_4 ). This
part of the code was only needed for PHP <= 5.3 and this version is not
supported anymore by WooCommerce.
2019-08-23 15:58:13 -03:00
Peter Westwood
4448235a16
Coding Standards: Add missing space.
2019-05-24 18:15:24 -06:00
Peter Westwood
f70dcc6a01
Add filters to file paths passed to the different xsendfile like backends.
...
Different server configurations can require different paths to be sent and it isn't always possible for a plugin to know the correct path for a platform.
These filters will allow a hosting provider to install a platform level configuration via an `mu-plugin` to make sure things work in there configuration.
2019-05-24 17:10:17 -06:00
claudiulodro
afd24dea4b
Add http(s) to // download urls
2018-10-11 13:31:18 -07:00
claudiulodro
989230f2b9
Refactor for increased safety
2018-10-11 13:31:18 -07:00
claudiulodro
88d506bac0
Dont do abspath file_exists check on urls that start with // since those are remote urls and not local urls
2018-10-11 13:31:18 -07:00
Mike Jolley
b7099509ee
If the file size cannot be read, ignore range headers.
...
Fixes #20204
2018-05-24 16:10:45 +01:00
Peter Fabian
e31420234a
Skip download remainig check if doing ranged request.
...
This allows to finish listening/waching the file on iOS device if the remaining download count goes from 1 to 0.
2018-05-09 16:34:58 +02:00
Peter Fabian
e5dfa71e23
Moved check for download log to WC_Download_Handler.
2018-05-09 15:52:02 +02:00
Peter Fabian
b920fb5786
Fixed bugs introduced by refactoring.
2018-05-09 14:29:52 +02:00
Peter Fabian
10fdae02bb
Updated documentation according to WP CS.
2018-05-09 11:40:02 +02:00
Peter Fabian
3faf49b4aa
Sanitize HTTP_RANGE input.
2018-05-09 11:13:36 +02:00
Peter Fabian
ba79747975
Backwards compat fixes for range download.
2018-05-08 11:47:05 +02:00
Peter Fabian
cb7ebe9aae
Split handle_range_request function, code cleanup.
2018-05-07 23:56:12 +02:00
Peter Fabian
ceb713adbc
Basic range download handling for Force download.
2018-05-07 10:05:02 +02:00
Claudio Sanches
88d0b502d9
Fixed includes/class-wc-download-handler.php PHPCS violations
2018-03-22 14:12:36 -03:00
Mike Jolley
b727f4ce64
Hash may not exist
2018-03-07 15:13:40 +00:00
Alex MacArthur
bc41fb0ba9
Use wc_get_order(), handle failure in case WC_Order not returned.
2018-02-21 15:39:43 -06:00
Alex MacArthur
931bf27511
Fix spacing, use hash_equals to verify uid.
2018-02-21 07:45:07 -06:00
Alex MacArthur
3e0e75ebc3
Fix spacing issues.
2018-02-21 07:34:56 -06:00
Alex MacArthur
00e71b304d
Hash customer email address in download URLs.
2018-02-21 07:34:56 -06:00
Mike Jolley
3459f83a9d
When serving downloads, ensure order/key are set and valid. Fixes #18328
2018-01-03 10:55:57 +00:00
The Dramatist
31155ed531
Woocommerce download readfile chunk number hook proposal ( #17699 )
...
* A hook proposal to modify the chunk number.
`woocommerce_download_readfile_chunk_number` hook is proposed to make modifying the chunk number easily.
* Constant IMO declared for changeable chunk size.
New constant `WC_CHUNK_SIZE` declared to make `WC_Download_Handler` class's `readfile_chunked` method's chunk size changeable.
2017-11-15 16:32:28 +00:00
Mike Jolley
3e7968d37b
Merge branch 'master' into pr/16418
2017-11-13 14:37:18 +00:00
Mike Jolley
220728544a
Merge pull request #17631 from woocommerce/update/page-caching-class
...
Page caching class
2017-11-10 14:12:13 +00:00
Claudio Sanches
22232f29c7
Fixed PHPCompatibility issues
...
Closes #17625
2017-11-09 16:36:29 -02:00
Mike Jolley
9f059e17a9
Add helper function instead of calling method, and restore old method for bw compat
2017-11-08 15:07:00 +00:00
Gerhard Potgieter
7b9fb6c0cb
Change nocache_headers hook firing ( #17540 )
...
* wp hook is too late to fire the nocache_headers filter, some caching plugins read it before that it seems.
* Create do_not_cache_page helper function and call that instead of nocache_headers
* Must add checks to prevent caching on certain pages as well
* Nothing to return
2017-11-08 14:27:30 +00:00
Josh Smith
5e4269267f
[ #12517 ] Change spacing and add full stop to comment to match WordPress style guide.
2017-08-23 03:15:23 +00:00
Josh Smith
3953fd081c
[ #12517 ] Get data for get_download_count from download log table
2017-07-31 03:44:11 +00:00
Josh Smith
399269a4f1
[ #12517 ] Implement logging product downloads into new logging table
2017-07-30 22:38:17 +00:00
Mike Jolley
fd12c344f8
Ensure we have a http URL for file path replacements
...
Closes #16179
2017-07-21 11:11:17 +01:00
Rasmus Bengtsson
185934fad9
Fix phpdoc to include params and correct types
2017-05-15 13:50:52 +02:00
Mike Jolley
7fd2f4f554
Support (not really) relative paths
...
Fixes #13750
2017-03-24 11:48:32 +00:00
Mike Jolley
d55653a408
Merge branch 'master' into fix-13498
...
# Conflicts:
# includes/class-wc-order.php
# tests/unit-tests/crud/data.php
2017-03-15 15:52:40 +00:00
Claudio Sanches
591327287a
Do not set remaining downloads when is unlimited
2017-03-13 21:24:59 -03:00
Claudio Sanches
c4134586cd
FUpdate how save download dates
2017-03-13 20:54:33 -03:00