=== Jeet Product Manuals ===
Contributors: jeetsanwal
Tags: woocommerce, product manuals, pdf, variations, documents
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Requires Plugins: woocommerce
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Give each WooCommerce model the right PDF manual. Product defaults, variation overrides and a paginated document coverage report.

== Description ==

A 110V tool and its 230V version should not have to share the same installation manual. Jeet Product Manuals adds named PDF links to products and lets each variation inherit those links, use its own set, or hide documents.

* Choose up to 20 PDFs per product or variation from the WordPress Media Library.
* Give each link a clear label: installation manual, specifications, care guide, and so on.
* Standard WooCommerce variation selections update the displayed documents. Reset restores the product defaults.
* The independent "Manuals for" selector also works without the standard variation form. It loads models only when requested, in batches of 50.
* Review saved document coverage under WooCommerce → Manual coverage. Products and variations are paginated, 20 per page; inherited documents and deleted attachments are checked.
* Use the Product Manuals block or [jeet_product_manuals] shortcode where a template does not call the standard product-summary hook.
* No adverts, upgrades, signup, telemetry, remote services, frontend credits or order data access.

Only PDFs registered as application/pdf attachments are accepted. The plugin stores attachment IDs and labels rather than arbitrary URLs or filesystem paths. Document links are escaped before output. Published products must be visible and have no password. Draft, private, hidden and password-protected products, and their models, are excluded from the public interface.

**Public documents only:** Media Library PDF URLs are public WordPress uploads. This plugin does not protect files or provide paid/private downloads. Never put customer, identity, payment or other private files here.

The plugin uses WooCommerce product CRUD for saved metadata and does not read or write orders. HPOS compatibility is declared because no order storage APIs are used. No files are uploaded or deleted by the plugin itself; the standard Media Library handles uploads.

== Installation ==

1. Install and activate WooCommerce. Use a WordPress and PHP version supported by your WooCommerce version. For example, WooCommerce 11.2 requires WordPress 7.0 or newer even though this plugin's minimum is WordPress 6.5.
2. Upload the jeet-product-manuals folder, or install the plugin ZIP through Plugins → Add New → Upload Plugin.
3. Edit a WooCommerce product in its standard product editor. Open Product data → Manuals.
4. Add a PDF, choose it from Media Library, enter a link label and update the product.
5. For a variable product, expand a variation and choose Inherit product documents, Use these documents, or Hide documents. Save the variation changes.
6. Open the storefront and select a model. Check WooCommerce → Manual coverage for missing documents.

== Frequently Asked Questions ==

= Does each variation get its own documents? =

Yes. Inherit uses the current parent documents; Custom uses only that variation's documents; Hide shows none. A Custom variation with no valid PDF has no documents; it does not fall back to the parent. Choosing Hide keeps saved custom rows so switching back does not discard them.

= Which frontend templates work? =

Automatic placement uses woocommerce_single_product_summary. Standard WooCommerce variation forms synchronize through found_variation and reset_data events, including their AJAX variation lookup. Block templates that do not call that hook can use the Product Manuals block or shortcode. The independent Manuals for selector works there as well. It controls documents only; it does not change the cart's selected variation. Synchronization with every third-party or newer block-specific add-to-cart selector is not claimed.

= Which product editor works? =

Manage PDFs in the standard WooCommerce Product data panel and variation panels. The block is for displaying manuals in page and site templates; it is not a replacement product editor. Alternative product editors must expose the standard WooCommerce product-data hooks to show these fields.

= Can I put a particular product's documents on another page? =

Use [jeet_product_manuals product_id="123"] or enter that product ID in the Product Manuals block. Only public, visible, published products without a password are accepted. Duplicate displays of the same product are suppressed within one page request.

= Can I use external URLs, private PDFs or Word files? =

No. This version deliberately accepts public PDF attachments from Media Library. It does not accept typed external links, private attachments, file paths, protected downloads or other formats. A WordPress-managed attachment URL may be served through your existing media/CDN configuration; the plugin itself makes no remote requests.

= Why does Manual coverage say Missing manual? =

The product or variation currently has no valid PDF in its effective document set. A deleted attachment, changed MIME type, private attachment or invalid URL is skipped. Hidden by choice is listed separately. The report checks saved configuration, not whether the product is currently public, and does not check the remote HTTP availability or contents of each PDF.

= Will it slow down all my pages? =

Frontend assets load only when manuals render. Simple products do not load the frontend script. Model lists are requested on demand, 50 at a time; the coverage report checks only 20 products or variations per page. There are no background scans or scheduled tasks.

= What happens when WooCommerce is inactive? =

The integration does not initialize, and an administrator sees a dependency notice. Your saved document metadata and PDFs remain in place.

= What happens on uninstall? =

Product document assignments and uploaded media are retained to prevent accidental data loss. Remove assignments in the product editor if you want to clear them before uninstalling. The plugin creates no separate tables, scheduled tasks, options or user data.

== Privacy ==

No analytics, telemetry, advertising, external service requests, cookies or personal-data storage are added. The public read-only model endpoint returns only published visible product models and their public PDF labels/links. Standard WordPress and WooCommerce services operate independently of this plugin.

== Changelog ==

= 1.0.0 =
* First release: product PDF sets, inherit/custom/hide per variation, frontend model switching, block/shortcode display and paginated coverage report.
