Skip to content

Folio

Folio prints what is already in your shop: a sheet for one product, a catalog of a category or of the whole shop, or a price list table. Every document opens in its own page styled for print, and File > Print > Save as PDF in your browser turns it into a file.

  • Product sheet: one product per page. Image, SKU, GTIN, price, summary, description, attributes, categories, availability, dimensions and weight, each one switchable.
  • Catalog: every product in a category, or in the whole shop. Printed in one to four columns; on screen it stays a single column.
  • Price list: SKU, name, GTIN, availability and price in a table. The column headings repeat at the top of every printed page.

A server-side PDF engine is tens of megabytes, mostly fonts, and runs out of memory on a large catalog. Your browser already has a good one: selectable text, the right font for every alphabet, images at the printer’s resolution, and no timeout. Folio produces the document; the browser produces the file.

What a browser cannot do is make a file with nobody at the keyboard. Folio does not build files on a schedule, export in the background or attach sheets to emails, and there is no paid edition that does.

Prices are read through WooCommerce’s own get_price_html() for whoever opened the document. Sale prices print with the regular price struck through, the tax display setting applies, and any plugin that changes prices for a role or a quantity is reflected. A catalog-mode plugin that hides prices hides them here too. Documents are sent with no-cache headers, so one customer’s prices are never served to the next.

  • A link under the add-to-cart form on product pages (woocommerce_after_add_to_cart_form).
  • Catalog and price list links after the product loop on shop and category pages (woocommerce_after_shop_loop). On a category page they print that category. Attribute and price filters are not carried over.
  • A Print row action on the admin products list.
  • The shortcode, anywhere: [folio_print mode="sheet" id="123" text="Print this"]. mode is sheet, catalog or pricelist; on a product page id can be left out.

Both front-end links hang on classic WooCommerce hooks. A shop page built from the Product Collection block does not fire woocommerce_after_shop_loop, so place the shortcode there instead. Each link can be switched off in the settings.

A document holds at most 200 products. Past that it is split into parts, “part 1 of 25” with a link to the next, and each part is its own print job. The last line of every document says how many products it holds, so you can tell a document that ended from one that was cut short.

Anyone who can see a product can print it. A private, password-protected or catalog-hidden product is refused unless the visitor could already read it.

WooCommerce > Folio:

  • where the links appear;
  • which fields each document shows;
  • catalog columns (1 to 4, applied when printing);
  • logo (a media library ID), shop name, print date and product count in the header and footer;
  • a footer note, for example how long the prices are valid;
  • your own document titles and column headings. An empty field uses the translated default.
Filter What it changes
folio/can_print Whether a product may be printed (bool $allowed, WC_Product $product).
folio/fields The list of printable fields and their labels.
folio/products/args The product query arguments for catalogs and price lists.
folio/batch_size Products per document part (default 200).
folio/document The built document before it is rendered.

WordPress 6.5 or newer, PHP 8.1 or newer, WooCommerce active.