=== WooCommerce Product Preview ===
Contributors: coderalamin
Tags: woocommerce, product preview, document preview, pdf preview, file preview
Requires at least: 4.0
Tested up to: 7.1
Stable tag: 1.2.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Preview PDFs, Word, Excel, and PowerPoint files directly on WooCommerce product pages.

== Description ==

**WooCommerce Product Preview** adds a simple product preview button to your WooCommerce store, allowing customers to view supported documents directly from the product page before making a purchase.

It's ideal for **books, ebooks, digital products, catalogs, brochures, product guides, course materials, sample chapters, and other document-based products**.

Instead of asking customers to download a file or leave the product page, you can give them a quick preview of the content and help them make a more informed purchasing decision.

The plugin uses Google Docs Viewer to display supported documents in a convenient preview window.

== Key Features ==

* **PDF Preview** — Let customers preview PDF files directly from your product pages.
* **Word Document Preview** — Support for Microsoft Word documents.
* **Excel Preview** — Preview Excel spreadsheets before purchase.
* **PowerPoint Preview** — Display PowerPoint presentations directly from the product page.
* **Product Preview Button** — Add a clear preview button to your WooCommerce products.
* **Shortcode Support** — Use `[product_preview_button]` to place the preview button anywhere you need. The original `[read_little_button]` shortcode remains supported for backwards compatibility.
* **WooCommerce Integration** — Designed specifically for WooCommerce product pages.
* **Customizable Styling** — Customize the preview button appearance and placement from the plugin settings.
* **Simple Setup** — Add your document, configure the preview, and let your customers view it.

== Perfect For ==

WooCommerce Product Preview is especially useful for:

* Books and ebooks
* Sample chapters
* Digital products
* Product catalogs
* Brochures
* Course materials
* Product documentation
* Reports and guides
* Downloadable resources

== How It Works ==

1. Add a supported document to your WooCommerce product.
2. Configure the preview settings.
3. A **Preview** button is displayed on the product page.
4. Customers can preview the document before deciding to purchase.

The preview opens without requiring customers to download the original file first.

== Installation ==

= From the WordPress Dashboard =

1. Log in to your WordPress dashboard.
2. Go to **Plugins > Add New Plugin**.
3. Search for **WooCommerce Product Preview**.
4. Click **Install Now**.
5. Click **Activate**.

= Manual Installation =

1. Download the plugin ZIP file.
2. Go to **Plugins > Add New Plugin > Upload Plugin**.
3. Select the plugin ZIP file.
4. Click **Install Now**.
5. Activate the plugin.

= Configuration =

1. Make sure WooCommerce is installed and activated.
2. Edit a WooCommerce product.
3. Add the document you want customers to preview.
4. Open the plugin settings to configure the preview button, position, supported file types, and styling.
5. Visit the product page and test the preview.

== Frequently Asked Questions ==

= What file types are supported? =

The plugin supports PDF, Microsoft Word, Excel, and PowerPoint documents.

= Can I customize the preview button? =

Yes. You can customize the button styling and position from the plugin settings.

= Can I use a shortcode to place the preview button? =

Yes. Use the `[product_preview_button]` shortcode to display the preview button anywhere supported by your WooCommerce layout.

The original `[read_little_button]` shortcode is also supported for backwards compatibility.

= Will it work with my WooCommerce theme? =

The plugin is designed to work with WooCommerce-compatible themes. Most themes should work without additional configuration, although heavily customized themes may require additional styling.

= Can customers preview a document without downloading it? =

Yes. Supported documents can be displayed in the preview viewer directly from the product page.

= Does the plugin work without WooCommerce? =

No. WooCommerce Product Preview requires WooCommerce to be installed and activated.

== Screenshots ==

1. **Plugin Settings** — Configure preview behavior, button position, and styling.
2. **Product Edit Screen** — Configure document previews for your WooCommerce products.
3. **Product Preview Button** — Customers can access the preview directly from the product page.
4. **Document Preview** — Display supported documents in a convenient preview window.

== Changelog ==

= 1.2.0 =
* Rebranded the plugin as **WooCommerce Product Preview**.
* Improved plugin description and documentation.
* Updated supported document preview messaging.
* Added the `[product_preview_button]` shortcode.
* Retained `[read_little_button]` for backwards compatibility.

= 1.1.0 =
* Added support for PDF, Excel, and Word document previews.
* Added the `[read_little_button]` shortcode for flexible button placement.
* Fixed margin issues after image previews.

= 1.0.0 =
* Initial release.
* Added basic document preview functionality and button customization options.

== Upgrade Notice ==

= 1.2.0 =
* The plugin is now **WooCommerce Product Preview**, with improved documentation and clearer product preview functionality.

== License ==

WooCommerce Product Preview is licensed under the GPLv2 or later.

See the [GNU General Public License](https://www.gnu.org/licenses/gpl-2.0.html) for more details.