=== Drive Downloads Lite ===
Contributors: drivedownloads
Donate link: https://drivedownloadspro.com/plugins/drive-downloads-pro/
Tags: google drive woocommerce, google drive downloads, cloud download links, external file downloads, woocommerce digital products
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 2.0.3
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connect WooCommerce downloads to Google Drive and insert shared folders or files as download URLs directly from the product editor.

== Description ==

Drive Downloads Lite connects WooCommerce with Google Drive so you can turn your Drive files and folders into product downloads in just a few clicks.

Instead of copying and pasting long sharing URLs, you get a clear **“Choose from Google Drive”** button inside the WooCommerce product editor. You pick a folder or file with the official Google picker and the plugin automatically fills the WooCommerce **“File URL”** field for you.

The Lite version is designed to be **simple, safe and fast**:

* Uses your **own** Google Cloud project and OAuth credentials.
* Works with folders/files that you already share (for example “Anyone with the link can view”).
* Does **not** change sharing permissions or file contents in Google Drive.
* Does **not** grant or revoke access per order – it only helps you link existing Drive content to products.

You stay in full control of your Drive. The plugin simply saves time and reduces mistakes when turning those Drive links into WooCommerce downloads.

**Main benefits**

* **Faster product setup** – visually pick Drive items instead of copying and pasting URLs.
* **Fewer broken links** – URLs come directly from the Google Drive picker.
* **Clean admin UI** that matches the Pro edition, so upgrading later is seamless.
* **Lightweight** – no extra database tables, no front-end scripts; everything runs in the WooCommerce admin.

**Typical use cases**

* Simple digital products (PDFs, ZIPs, templates, audio, video, etc.).
* Shared resource libraries where all customers access the same Drive folder.
* Stores that already manage visibility in Google Drive and only need a better way to connect files to WooCommerce products.

= Lite vs Pro =

Drive Downloads Lite focuses on quick, public (or already-shared) download links.  
Drive Downloads Pro adds full **access control** on top of the same integration.

**What you get in Lite (this plugin)**

* Connect WooCommerce to Google Drive using OAuth.
* Google Drive picker inside the product editor.
* “Choose from Google Drive” button next to the WooCommerce download fields.
* Automatic insertion of the selected folder/file URL into “File URL”.
* Optional default download name per product or globally.
* No changes to Google Drive permissions – you manage those directly in Drive.

**What you get in Drive Downloads Pro (paid upgrade)**

* Automatic access per order: grant access in Google Drive when the order is completed.
* Automatic revoke: remove access when an order is cancelled, refunded or trashed.
* Private, email-based access (buyer-only folders/files – no public links).
* Multiple access types (customer only, public link, Gmail-only, etc.).
* Permission levels (view, comment, edit) and extra security options  
  (block download/copy for viewers, prevent editors from re-sharing, and more).
* Activity logs and WooCommerce order notes for access changes.
* Priority support, ongoing updates and new features.

Start with the free Lite version to validate your workflow and upgrade to Pro at any time to add automated, private access control:

[Drive Downloads Pro](https://drivedownloadspro.com/plugins/drive-downloads-pro/)

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install it from “Plugins → Add New”.
2. Activate the plugin through “Plugins → Installed Plugins”.
3. Go to the new **Drive Lite** settings page in the WordPress admin.
4. In your Google Cloud Console:
   * Create an OAuth 2.0 Client (type “Web application”).
   * Add the plugin’s redirect URL shown on the settings page.
   * Create an API key for the Google Picker and restrict it by HTTP referrers.
5. Copy and paste into the plugin settings and save:
   * Client ID
   * Client Secret
   * Picker API key
6. Click **Connect with Google** and complete the OAuth flow.
7. Edit a WooCommerce product and enable “Downloadable”.
8. Go to the **Drive Lite** tab and use the **Choose from Google Drive** button to select a folder or file.
9. Publish or update the product. WooCommerce now uses that Google Drive URL as the download.

== Frequently Asked Questions ==

= Does this plugin make my Google Drive content private per customer? =

No. The Lite version only helps you select Google Drive folders/files and insert their URLs into WooCommerce downloads. It **does not** manage individual user permissions or per-order access.

If you need automatic grant/revoke of access per order, private links or more advanced control, you will need the Pro version: [Drive Downloads Pro](https://drivedownloadspro.com/plugins/drive-downloads-pro/)

= Are the links public or private? =

The plugin does not force any sharing mode by itself. It uses the share URL returned by Google Drive and you remain in control of how each folder or file is shared.

For a simple “Lite” setup, you typically configure your Drive items as “Anyone with the link can view” and then use those URLs as WooCommerce downloads.

= Does the plugin upload or host my files? =

No. Files stay in your Google Drive account. The plugin only works with URLs and the Google Drive API.

= What data does the plugin store? =

The plugin stores in your WordPress database:

* Google OAuth tokens (access / refresh tokens).
* Your Google Client ID / Client Secret / API key.
* The selected Google Drive URLs linked to each product.

Access tokens and secrets are stored as WordPress options and may be additionally encrypted using PHP’s encryption functions when available (libsodium or OpenSSL). No file contents are copied into your WordPress site.

= Is this plugin GDPR compliant? =

The plugin itself does not create new customer fields. It uses the existing WooCommerce order and customer data and works with Google Drive through their API.

As with any site that processes personal data, you should:

* Review Google’s privacy terms.
* Document the use of Google Drive in your privacy policy.
* Ensure you have an appropriate legal basis for processing data.

= Can I use it without WooCommerce? =

No. This plugin is built specifically for WooCommerce downloadable products and requires WooCommerce to be active.

= Does it work on multisite? =

The plugin is designed to work on standard single-site and basic multisite setups. Each site manages its own Google connection and settings.

== External services ==

This plugin connects your WooCommerce store with **Google Drive** using your own app in **Google Cloud Console**.

You will need to:

* Create a Google Cloud project.
* Create OAuth 2.0 credentials (Client ID and Client Secret).
* Create an API key for the Google Picker.

These are configured on the plugin settings page, following the documentation provided here:

[Documentation](https://drivedownloadspro.com/documentation/)

Through your own Google app, the plugin:

* Lets you sign in with your Google account (OAuth) to link your Drive.
* Shows the Google Drive picker so you can choose folders or files.
* Reads basic information about your Drive user (name, email address and profile photo link).
* Reads metadata for the selected Drive items (IDs, names, URLs, mime types, etc.) so it can insert the correct URL into the WooCommerce download field and show the connection status in the admin.

The plugin does **not** upload your files to other servers and does **not** send data to any third party other than Google’s APIs used for this purpose.  
The Lite version does **not** change your Google Drive sharing settings or file contents; it only reads the information needed to build download URLs and display the connection in your dashboard.

Please review Google’s own terms and privacy information here:

* [Google APIs Terms of Service](https://developers.google.com/terms)  
* [Google Privacy Policy](https://policies.google.com/privacy)

== Screenshots ==

1. Drive Lite settings screen with Google connection and Pro upgrade banner.
2. Drive Lite tab in the WooCommerce product editor.
3. Google Drive picker window to select a folder or file.
4. WooCommerce downloads table with a Drive URL inserted as the file URL.

== Changelog ==

= 2.0.3 =
* Forced WooCommerce to redirect Google Drive/Docs URLs instead of trying to proxy remote Drive files through the server.
* Loaded bundled plugin translations from the languages folder.

= 2.0.2 =
* Hardened the admin connection card rendering so Google profile data is inserted safely.
* Kept the Google picker button disabled while the picker window is open to avoid duplicate picker windows.
* Reduced the OAuth scope to Drive read-only for the Lite workflow.
* Corrected the connection card CSS class while keeping backward compatibility with the previous typo.

= 2.0.1 =
* Improved marketing-oriented description for the plugin page on WordPress.org.
* Simplified and clarified the “External services” section to focus on how the plugin connects to your own Google app and links to official documentation.
* Minor wording and documentation refinements to better explain the difference between Lite and Pro.

= 2.0.0 =
* First public release of Drive Downloads Lite.
* Google OAuth connection and token storage.
* Google Drive picker integration in the WooCommerce product editor.
* Automatic insertion of Drive folder/file URLs into WooCommerce downloads.
* Pro upgrade banner on the settings page.

== Upgrade Notice ==

= 2.0.3 =
Compatibility update for WooCommerce downloadable products using Google Drive URLs.

= 2.0.2 =
Security and UI hardening update for the admin connection card and Google Drive picker.

= 2.0.1 =
Readme and documentation improvements for clearer onboarding and external services explanation.

= 2.0.0 =
Initial release. Safe to install on WooCommerce stores that need simple Google Drive download links without advanced access control.
