Hello @michalooki,
It’s possible with a little of code, like you can disable stop this file to getting created during WooCommerce’s installation with:
add_filter( 'woocommerce_install_skip_create_files', '__return_false
);
But note that while saving the settings this file gets created again because WooCommerce wants to ensure that files are protected, anyway you can automatically remove it after gets created with:
add_action( ‘woocommerce_settings_saved’, function() {
$upload_dir = wp_get_upload_dir();
$file_path = $upload_dir[‘basedir’] . ‘/woocommerce_uploads/.htaccess’;
if ( file_exists( $file_path ) ) {
unlink( $file_path ); // Remove file.
}
});
`
You sound like someone that know what’s doing, but I’ll alert anyway in case someone else find this thread, please use those code carefully and check if people can’t browser your downloads or access directly or find those files on Google.
I hope it helps you.