Send $count param as argument so that its updated consistently.

As far as I can see, this count param is not really needed, but it will still be good to keep it updated in case its getting used in an edge case that I have not considered.
This commit is contained in:
vedanshujain 2021-11-17 14:59:18 +05:30
parent 209566b7c4
commit a6626eeb64
1 changed files with 1 additions and 1 deletions

View File

@ -270,7 +270,7 @@ class WC_Download_Handler {
);
$count = 0;
$file_path = str_replace( array_keys( $replacements ), array_values( $replacements ), $file_path );
$file_path = str_replace( array_keys( $replacements ), array_values( $replacements ), $file_path, $count );
$parsed_file_path = wp_parse_url( $file_path );
$remote_file = null === $count || 0 === $count; // Remote file only if there were no replacements.