Give Customers a Personal Library
Give Customers a Personal Library —
If you sell digital products through WooCommerce, the shortcode builds a personal “My Files” page for each customer — every protected file they’ve purchased, in one grid, with click-to-view links. It’s a Pro feature.
What it replaces. Manually emailing files. Maintaining a “your downloads” page by hand. Customers asking “where’s my file?” three weeks after purchase.
How it works
Each WooCommerce product variation can be tied to a protected file (via the Media Guard PDF Path field) and a required role. When a customer buys it, they’re granted that role automatically. The shortcode then looks at the current user’s roles and shows every product whose required role they have.
Set it up in 3 steps
- Wire up your WooCommerce products. Follow Sell Protected Files with WooCommerce to attach a protected file and a required role to each product variation.
- Create a “My Library” page. Title it whatever your customers will recognize (“Your Files”, “My Library”, “Members Area”). Drop in just the shortcode:
[mediaguard_library] - Link to it from your account menu. Most themes let you add a custom menu item to the WooCommerce My Account menu, or you can link to it from a “Thanks for your purchase” page.
What the customer sees
A responsive grid of cards. Each card shows the product image, the product title, and a View button that opens the file in Media Guard’s protected viewer. Files they haven’t purchased never appear.
If the customer hasn’t bought anything yet — or isn’t logged in — the page shows “No content in your library yet.” (When logged out, it shows nothing; pair the page with a Visit Account / login prompt above the shortcode.)
Customizing the look
The shortcode ships with sensible defaults (cards 220px wide, auto-fill grid). To restyle, target these classes in your theme CSS:
.mg-library-grid— the wrapper grid..mg-lib-card— each card..mg-lib-thumb— the image holder..mg-lib-title— product title..mg-lib-actions .button— the View button.
Common questions
- Can I show variation names instead of parent product names? The grid currently shows the parent product name and image to keep it tidy. Custom code can swap to variation-level details if needed.
- Files from old purchases aren’t showing. The library is role-driven. If a refund or order cancellation removed the customer’s role, the file disappears from the library — but the file itself is still safe.
- Can I limit it to one product type? Today it shows every protected variation the customer’s roles unlock. If you need filtering (by category, vendor, etc.), let us know what you’d use.
Next steps
- Sell Protected Files with WooCommerce — the setup that makes this shortcode work.
- How access works — Roles, Groups, and Purchases.