How to set up Drive Downloads Pro with Google Drive
Drive Downloads Pro connects your WooCommerce downloadable products with Google Drive and automatically manages folder/file access based on order status:
- When an order becomes “Completed” → the plugin grants Google Drive access.
- If the order is cancelled / refunded / deleted → the plugin attempts to revoke that access.
In this guide you’ll learn:
- What you need before getting started
- How to create Google Cloud credentials
- How to connect the plugin to your Google Drive account
- Which permission and security settings are recommended
- How to use the Google Drive picker in WooCommerce
- Common issues and how to fix them
1) Requirements before getting started
- A site with HTTPS (SSL). Google OAuth does not work without it.
- WordPress and WooCommerce installed and active.
- Access to Google Cloud Console to create credentials.
- A Google account with access to the Drive folders/files you will deliver (courses, downloads, client materials, etc.).
Important: the content you deliver must be inside the same Google Drive account you connect to the plugin.
2) Create credentials in Google Cloud
2.1 – Create or choose a project
- Go to: https://console.cloud.google.com
- At the top, click Select project.
- Create a new project (example: “WooCommerce Drive”) or choose an existing one.
- Keep it selected for the next steps.
2.2 – Enable the required APIs
- Go to APIs & Services → Library.
- Search for and enable:
- Google Drive API
- Google Picker API
Both must show as Enabled.
2.3 – Configure the OAuth consent screen
- Go to APIs & Services → OAuth consent screen.
- User type: usually External.
- Fill the basic information:
- Application name (example: “Drive Downloads Pro – My store”).
- Support email.
- Domain (if you have it configured).
- Under Authorized domains, add your domain (example):
yourdomain.com - In Scopes, add Google Drive access (Drive API scope).
- Save the changes.
Note: for internal/test use, full Google verification is usually not required.
2.4 – Create OAuth credentials (Client ID and Client Secret)
- Go to APIs & Services → Credentials.
- Click Create credentials → OAuth client ID.
- Application type: Web application.
- In Authorized JavaScript origins, add:
https://yourdomain.com- Any other domains/subdomains you use (staging, different admin URL, etc.).
- In Authorized redirect URIs, paste the plugin redirect URL:
- In WordPress admin go to Drive Pro and look for Default redirect URL.
- Copy/paste it exactly into Google Cloud.
- Click Create and safely store:
- Client ID
- Client Secret
2.5 – Create the API Key for Google Picker
- In Credentials, click Create credentials → API key.
- After it’s created, click Edit to restrict it.
- Restriction type: Websites (HTTP referrers).
- Add at least these referrers:
https://yourdomain.com/wp-admin/*https://yourdomain.com/*
- Save.
This API key is used in the browser to open the Google Drive selector (Google Picker).
3) Configure Drive Downloads Pro in WordPress
After activating the plugin, you’ll see a menu in WordPress admin called Drive Pro.
3.1 – Activate the plugin with your license
If the plugin shows as disabled, open Drive Pro and enter:
- License key
- License email
Click Save license and activate.
3.2 – Google Drive connection & API credentials
Go to Drive Pro and fill these fields:
- Google Client ID
- Google Client Secret
- Google Picker API key
- Custom redirect URL (optional) (leave empty unless you must override it)
- Enable Shared Drives support (supportsAllDrives) (enable only if you use Shared Drives)
Then click Save settings.
3.3 – Connect with Google (Connection status card)
At the top of the page you’ll see the connection card:
- Connected / Not connected status
- Buttons:
- Connect with Google (starts the OAuth connection)
- Disconnect (removes stored tokens)
- Test connection (checks your Google Drive connection)
- Reset tokens (clears tokens; you must connect again)
- Revoke access in Google (revokes the token in your Google account)
Recommendation: after connecting, click Test connection to confirm everything works.
3.4 – Google Drive content & selection settings
These settings control what you can pick from Drive and how selection works:
- Default customer access role (global default):
- View only (Reader) (recommended)
- Can comment (Commenter)
- Can edit (Writer) (only if needed)
- Only allow Gmail addresses (optional):
- If enabled, access is granted only to
@gmail.comor@googlemail.comemails for private access. - If a non-Gmail email purchases a private product, the plugin will add a note to the order and won’t grant access automatically.
- If enabled, access is granted only to
- By default, limit folder selection to top-level folders in “My Drive” (optional).
- Show “Shared with me” content (optional).
- Allowed Google Drive content for selection:
- Only folders
- Only files
- Folders and files
3.5 – Order-based access & permission policy
These settings control who gets access when the order is Completed:
- Who receives access when the order is completed:
- Customer only (buyer email – private access)
- Anyone with the link (public access)
- Allow the shared item to be discoverable in Google Drive search (only applies to public links).
- For viewer access, block download and copy inside Google Drive where supported (optional).
- Allow editors (writers) to reshare content (optional).
- Send a Google email notification (private access only; optional).
- Additional message in the Google notification email (optional).
4) Per-product settings (Drive Pro tab in WooCommerce)
For downloadable products, open the product editor in WooCommerce and go to the Drive Pro tab.
Google Drive selection options
- Default download name (shown in the customer downloads table).
- Only use top-level folders:
- If enabled, this product can only use top-level folders from “My Drive”.
- Nested folders or shared items may be rejected when selected.
- Customer access in Google Drive:
- Use global default (reader/commenter/writer)
- Read only
- Read and comment
- Read and edit
Access overrides for this product
- Access visibility for this product:
- Use global setting
- Customer only (private)
- Anyone with the link (public)
- Restrict download / copy for this product (override global).
- Allow editors to reshare for this product (override global).
- Google notification email for this product (override global).
- Custom notification message for this product (optional; overrides the global message if set).
- Save Drive settings button (stores these overrides for the product).
5) How to use the Google Drive picker in your products
- Edit or create a downloadable product in WooCommerce.
- Enable the Downloadable checkbox.
- In the downloadable files section, click:
- Choose Drive folder, or
- Choose Drive file, or
- Choose from Drive (depending on your global “Allowed content” setting)
- Select the folder/file in Google Drive.
After selection, the plugin will automatically fill:
- The download name (editable)
- The Google Drive URL inside the product’s downloadable files list
When an order is marked as Completed, the plugin will:
- Apply the configured security options (download/copy restriction where supported, editors resharing rule, notification settings).
- Grant access to the customer email (private) or set public link permissions (anyone), depending on your configuration.
If the order is cancelled, refunded, or deleted, the plugin will attempt to revoke the permissions it created.
6) Recommended settings (quick scenarios)
Scenario A: Selling courses / digital products to end customers
- Who receives access: Customer only (private)
- Default role: Reader (view only)
- Restrict download/copy: Optional (enable for extra protection where supported)
- Notifications: Optional (Google invitation email)
- Gmail-only: Optional (only if your audience is mostly Gmail)
Scenario B: Public freebies / lead magnets
- Who receives access: Anyone with the link (public)
- Role: Reader (forced for public access)
- Discoverable in search: Usually disabled
- Notifications: Not relevant for public links
Scenario C: Client projects (shared work folders)
- Who receives access: Customer only (private)
- Role: Reader or Writer (only if clients must edit)
- Writers can reshare: Usually disabled (so you stay in control)
7) Common issues and quick fixes
- The “Connect with Google” button is disabled
→ Make sure you saved a Google Client ID first. The button is disabled if the plugin has no Client ID configured. - Google Picker shows “origin mismatch” or doesn’t load
→ Check your API key referrers in Google Cloud:https://yourdomain.com/wp-admin/*https://yourdomain.com/*
- “redirect_uri_mismatch” error
→ Your Google Cloud redirect URI does not match the plugin’s Default redirect URL. Copy/paste it again exactly. - “invalid_grant” error
→ Google invalidated the connection (password change, manual revocation, etc.). Use Reset tokens and connect again. - Customers didn’t get access after payment
→ Check:- The order status is Completed (not Processing / On hold).
- If Gmail-only is enabled, the billing email must be Gmail/Googlemail for private access.
- The selected folder/file is accessible by the same Google account connected to the plugin.
- The picker rejects a folder
→ That product has Only use top-level folders enabled and you selected a nested folder or unsupported selection. Select a top-level folder in “My Drive” or disable that restriction for the product. - I can’t see Shared Drives
→ Enable Shared Drives support (supportsAllDrives) in the plugin settings and confirm the connected account has access.
