NOTE: This will only work for the files that you UPLOAD to Google Drive.

For WordPress users: If you face a Google Drive Direct Link Download problem for woo-Commerce Products: Follow the below given steps on the left.

Supported link formats:

  • https://drive.google.com/open?id=12Bsgrhm4Zstxjj4sjK456eepXlmbjTJ0
  • https://drive.google.com/file/d/12Bsgrhm4Zstxjj4sjK456eepXlmbjTJ0/view?usp=sharing

Modifying Woo-Commerce Download Handler

Step 1: Sign in to Cpanel and navigate to public_html/wp-content/plugins/woocommerce/includes/class-wc-download-handler.php. Then right on it and press Edit.

Step 2: Copy below code and Paste after line 194 & hit Save Changes
$product = wc_get_product( $product_id );
$drive_filename = $product->get_downloads();
foreach( $drive_filename as $key => $each_download ) {
$filename = $each_download[“name”];
}

Step 3: Paste the Google Drive Share Link on above text field and paste the exact file name with extension in the next text field. (This method works only with .zip formats, So upload every files in zip format)

How to get your sharing URL ->

Step 4: Hit Create Direct Link button on this site. Copy the entire Google Drive Direct Download Link.


If you don't do the Step 2 Woo-Commerce product/s won't download as recognizable files. As mentioned in Step 3 upload all file/s in zip format & paste the exact file name with .zip extension before you hit Create Direct Link button on this site.

IF NOT ZIP FILE, file/s will get download as MP4.

IF ZIP FILE, file/s will get download as zip & works fine. Tested.

When Downloading...

How to get your sharing URL

Step 1: Go to Google Drive and right click the file that you want to share & and hit share or select the file and click the share or link icon on top.

 

 

 

 

 

 

Step 2: On the window that comes up, click "Get shareable link". When clicked on bottom left corner Google Drive shows that Link copied to clipboard.

Step 3: Make sure the dropdown is set to one of the "Anyone with the link..."
or "Anyone on the internet..." options, then click "Copy link".

Step 4: Now just paste that link into the text box above and create your direct link. Enjoy!

Share
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

4 thoughts on “Google Drive Direct Link Generator

Leave a Reply

Select your currency
USD United States (US) dollar