A WooCommerce plugin for collecting customer photos on WooCommerce products, storing crops as metadata, and generating consolidated order-level print sheets with bleed, watermark tabs, and puzzle layouts.
- Product Image Upload: Add photo images to WOI-enabled products from the product page
- Interactive Crop Modal: Cropper.js-based interface with zoom slider, rotation, orientation swap, and live preview
- Edit Mode: Pre-loads previously uploaded images if replacing items in cart
- Save Once, Crop as Metadata: Stores source image once and saves crop geometry (
x/y/width/height) instead of rewriting cropped files on every edit - Flexible Add-to-Cart Flow: Items can be added with or without images, but checkout enforces required image completion
- Progress Tracking: "x of y images" labels and visual "Edit Images" links in cart
- Puzzle Orientation Support: Puzzle crops can swap between portrait and landscape puzzle layouts
- Order-Level Print Sheet: Opens a full print preview with all order images consolidated onto printable pages
- Print-Time Crop Application: Applies saved crop geometry at render time for both single magnets and puzzle tiles
- Admin Re-Crop: Hover thumbnails on the order screen to reopen and adjust saved crops
- Automatic Packing: Bin-packs tiles across pages, respecting printer margins and configurable gaps
- Mixed Spec Sources: Each product defines visible area and puzzle grid, while global plugin settings define bleed, paper size, margins, and watermark text
- Auto-Orientation: Detects image landscape/portrait vs. product aspect ratio and swaps template orientation automatically
- Cached Print Tiles: Print sheets load tile images from dedicated versioned URLs instead of embedding large base64 blobs in the page HTML
- Bundled Cropper Assets: Cropper.js is shipped locally with the plugin instead of loaded from a CDN
- Corner Die-Cut: Clip-path polygon corners tie to wrap margin dimensions
- Hidden Order Meta: Internal
_woi_*metadata keys suppressed from customer view - Auto-Cleanup: Deletes uploaded WOI images when an order is trashed
- Copy or clone the plugin into
wp-content/plugins/woo-order-images/ - Activate it from WordPress admin > Plugins
- Configure global settings at WooCommerce > Order Images
- Set per-product image specs in the product edit screen
Installed sites can upgrade from tagged GitHub releases through the WordPress Plugins screen using the bundled GitHub update checker. Manual zip upload is still supported for first-time installs or fallback upgrades.
| Setting | Default | Unit | Purpose |
|---|---|---|---|
| Watermark text | BestLifeMagnets.com | text | Text printed on image bleed tabs |
| Bleed area | 0.4 | inches | Global bleed edge distance used in previews and print output |
| Top margin | 0.25 | inches | Printer safe zone top |
| Right margin | 0.25 | inches | Printer safe zone right |
| Bottom margin | 0.5 | inches | Printer safe zone bottom |
| Left margin | 0.25 | inches | Printer safe zone left |
| Page size | Letter | preset | Print sheet paper size |
| Tile gap | 0.1 | inches | Space between packed print tiles |
| Field | Default | Example | Purpose |
|---|---|---|---|
| Enable for this product | — | yes | Activate WOI for product |
| Visible width | 2.0 | 2.5 | Magnet face width in inches |
| Visible height | 2.0 | 3.5 | Magnet face height in inches |
| Image limit | 1 | 4 | Max images per line item |
| Puzzle layout | Off | 3×4 | Split one image across a puzzle grid |
-
WOI_Order_Images (
includes/class-woi-order-images.php)- Cart validation and item meta storage
- Add-to-cart/update-cart flow with image preloading
- Hidden meta key filtering
- Upload staging and order cleanup hooks
-
WOI_Frontend (
includes/class-woi-frontend.php)- Product page modal UI binding
- Crop modal state and export logic
- Rotation, orientation swap, and zoom controls
-
WOI_Admin_Order_Images (
includes/class-woi-admin-order-images.php)- Admin order details rendering
render_print_page(): order-level print sheet generationrender_print_image(): per-tile print image endpoint- Tile packing, page break logic, and watermark rendering
- Admin re-crop modal and crop save endpoint
-
WOI_Admin_Product_Settings (
includes/class-woi-admin-product-settings.php)- Product metabox UI for visible area, puzzle configuration, image limit, and admin list columns
-
WOI_Settings (
includes/class-woi-settings.php)- Global plugin options for watermark text, bleed, print margins, page size, and cleanup actions
- Collect: Gather structured image entries (
url+crop) from order items - Spec: Resolve each item's visible area and apply the current global bleed setting
- Orient: Detect image ratio vs. product aspect and auto-swap orientation if needed
- Crop: Apply saved crop geometry to source image at render time
- Pack: Bin-pack tiles left-to-right, then top-to-bottom, respecting page bounds and gaps
- Render: Output absolute-positioned tiles with:
- Versioned print-image URLs for each rendered tile
- Visible-area window for the final product face
- Bleed-capable tile images behind it
- Watermark bands positioned in the bleed area
- Cut outline polygons from the configured wrap geometry
- assets/js/frontend.js: Cropper.js integration, image rotation, crop metadata capture, and puzzle orientation swap
- assets/js/admin-order-crop.js: Admin re-crop modal behavior for order images
- assets/css/frontend.css: Product-page modal styles, zoom slider, and button layout
- assets/css/admin-order-crop.css: Admin hover and crop modal styles
- assets/css/print-sheet.css: Print-specific styles, watermark positioning, and color preservation hints
- Canonical source persistence: Source images are written once; edits update crop metadata only
- Order-level print: Consolidated output reduces paper waste and print jobs
- Global bleed: Bleed is a plugin-level print setting, not historical order data
- Versioned print tiles: Print images are requested separately and include cache-busting keys derived from crop/spec state
- Source-pixel bleed first: Bleed rendering prefers real surrounding source pixels and only stretches edges at image boundaries
- Canvas-based rotation: Frontend uses bitmap rotation rather than CSS-only transforms for crop accuracy
- Add the metabox field in
WOI_Admin_Product_Settings - Save it with product meta
- Retrieve it in item/spec resolution
- Apply it in frontend or print rendering as needed
Use WOI_Settings getters and the admin settings page rather than hard-coded values.
Modify the band geometry in render_print_page() and the supporting styles in assets/css/print-sheet.css.
Prefer REST, CLI, and direct print URLs before opening WooCommerce order edit screens. If you do open an order in admin, do not leave it locked/open when you are done.
- Update
woo-order-images.phpversion metadata - Update
readme.txtStable tag - Sync
readme.txtTested up towith the WordPress version used for release testing - Update
CHANGELOG.mdbefore tagging so GitHub release notes stay in sync - Update the
== Changelog ==section inreadme.txtso WordPress plugin details show the current release notes - Tag and release from Git
- Cart flow: Add WOI items with and without images; confirm checkout enforces required completion
- Integration: Cart add/update/edit flow with preload, rotate, and puzzle orientation swap
- Admin: Re-crop an existing order image from the hover control and verify the print view updates
- Print: Export PDF from browser print dialog; verify spacing, watermark size, page breaks, and bleed behavior
Release history is maintained in CHANGELOG.md.
This project is licensed under GPL-2.0-or-later.
Copyright (C) Tim Riker timriker@gmail.com
See LICENSE for the repository license notice.
This plugin bundles Cropper.js 1.6.2 under the MIT license. See assets/vendor/cropper/NOTICE.txt.
This plugin also bundles plugin-update-checker 5.6 under the MIT license for GitHub-based plugin updates. See vendor/plugin-update-checker/license.txt.
For issues or feature requests, contact the development team or open an issue on GitHub.