MakeMeHappy Terms Publisher for WooCommerce

Description

Manage one terms and conditions document from WooCommerce > Terms Publisher.

  • Publish your document with [mmhtp_terms_conditions].
  • Attach a PDF based on order status and customer/admin recipient type.
  • Configure the attachment filename with {order_id}, {order_number}, {site_name} and {date}.
  • Choose color or black-and-white PDF output and download a test PDF.
  • Use all features without registration, a license key or a paid service.
  • Translation-ready through the standard WordPress language pack system.
  • New orders retain their terms and PDF settings even after you edit the document.
  • One archived PDF is shared by all orders using the same document version.

Created by MakeMeHappy. This plugin manages and delivers documents supplied by the store owner; it does not supply legal advice or guarantee legal compliance.

Screenshots

Installation

  1. Install and activate WooCommerce.
  2. Upload the makemehappy-terms-publisher-for-woocommerce folder to /wp-content/plugins/ and activate it.
  3. Open WooCommerce > Terms Publisher and save your terms and email settings.
  4. Add [mmhtp_terms_conditions] to your terms page.
  5. Download a test PDF and verify a test order email before using the plugin for customers.

FAQ

How do I move from Woo Terms Publisher 1.1.0?

Back up your site and deactivate the old Woo Terms Publisher plugin before activating this edition. The folder and main file have changed, so installing this ZIP does not replace the old plugin automatically. If both editions are active, the new edition suspends its functionality to avoid duplicate attachments.

The existing document, email, filename and color-mode settings are read automatically. Legacy custom CSS is no longer used for new documents. Saving settings writes the new mmhtp_ options; the old options remain unchanged. The old [woo_terms_conditions] shortcode is supported as a compatibility alias, unless another plugin already owns that shortcode. Use [mmhtp_terms_conditions] for new pages.

Does this edition require a license?

No. All included features are free. It contains no Cloudflare license updater. Standard WordPress.org updates will be available after approval and publication under this slug.

Which document is attached when an old order email is resent?

From version 1.4.0, the text, PDF title and styles are stored once per distinct version, with one shared PDF. Each order stores a small reference to that version, plus its filename template and document date. Resending an email uses the saved version. Later edits affect new orders and the public shortcode only. Draft orders created by the Checkout Block are captured when they become submitted orders, not while the customer is still editing a draft. New orders created through WooCommerce administration or the REST API are also captured when first saved as a non-draft order.

The saved copy can be inspected on the order administration screen. It records the configured document, not proof that the customer read or accepted it. An empty document stays empty for that order. Changing the global email selection still controls whether an attachment is sent.

Orders created before this feature, or while the plugin was inactive, have no saved historical copy. The plugin cannot reconstruct their original terms and does not substitute the current document. No terms PDF is attached to such orders; their other email attachments are unaffected. A missing or invalid saved copy is indicated in order administration. Existing documents are not silently backfilled or overwritten.

Does an order-specific attachment filename create another PDF?

No. For example, obchodne_podmienky{order_number} sends obchodne_podmienky123.pdf for order 123 and obchodne_podmienky124.pdf for order 124. Both emails read the same archived terms.pdf. WordPress assigns the display name to the MIME attachment; no extra PDF file is rendered, renamed, copied or stored for each order. The number is part of the attachment name, not the PDF contents. Changing only the filename template does not create a new archived version. Changing the document text, title or PDF styling does.

This uses WordPress’ standard named attachment support. A third-party mail transport must preserve the associative attachment filenames passed by WooCommerce/wp_mail.

How do I update from the pre-directory editions (1.2.0 to 1.4.1)?

Back up the database and uploads first. Deactivate the previous Terms Publisher for WooCommerce edition, then install and activate this edition. Version 1.5.0 uses the new folder makemehappy-terms-publisher-for-woocommerce, so uploading the ZIP does not replace the previous folder. Settings keys, shortcodes and archive paths are unchanged. Do not run both editions together. Orders without historical data cannot be backfilled.

Existing 1.3.0 snapshots are consolidated in small background batches through WP-Cron and when their emails are sent. The full text is replaced by an archive reference only after the shared document is available. The exact redundant per-order PDF is then removed. Original terms, document dates and filename templates are preserved. On sites with WP-Cron disabled, run the scheduled event mmhtp_migrate_archive through your normal cron runner; email-triggered conversion still works. Unrecognized or invalid historical data is left untouched.

How are translations loaded?

Slovak and Czech translations are included, so they work immediately when the corresponding site, user or email language is selected. WordPress loads installed language packs from translate.wordpress.org first and uses the bundled files when no pack is available for that language. Other languages use English until their translations are installed. Switching the user or email locale is supported. This translates the plugin interface; your own terms and conditions text is not automatically translated.

Where are PDFs stored?

Each version is stored as uploads/mmhtp-terms-pdfs/VERSION_HASH/terms.pdf. The matching text and styles are stored once in a non-autoloaded database option; orders contain references. PDF generation is serialized with a small lock file and existing PDFs are reused unchanged. Saving edited settings archives that version; a missing PDF can also be built at first use. Test downloads reuse the same version. Empty terms do not create a PDF. The archive is retained when orders are removed; growth is by distinct document versions, not by order count. Old 1.2.0 test files and unknown historical files are not automatically removed.

Deleting an archived PDF does not delete its saved text. PDFs using the built-in styling can be regenerated on next use. Legacy documents with custom CSS require their original PDF: existing files are reused byte-for-byte, including consolidation of 1.3.0 files. Raw CSS is never processed. If the original file is missing or invalid, restore it from backup; the order screen shows a notice and no replacement PDF with changed styling is sent. Treat the document as public website content; do not put confidential customer information in it. Dompdf renders UTF-8 text and multiple pages. If Dompdf is unavailable, the simple fallback uses plain text and may transliterate accented characters.

How can I display a shortcode example without executing it?

In WordPress content processed by shortcodes, escape it with doubled brackets: [[mmhtp_terms_conditions]] (or [[woo_terms_conditions]] for the old example). Verify the resulting page in your editor/page builder.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“MakeMeHappy Terms Publisher for WooCommerce” is open source software. The following people have contributed to this plugin.

Contributors

“MakeMeHappy Terms Publisher for WooCommerce” has been translated into 1 locale. Thank you to the translators for their contributions.

Translate “MakeMeHappy Terms Publisher for WooCommerce” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

1.5.1

  • Include Slovak and Czech translations for immediate use while community translations await approval.
  • Prefer installed WordPress.org language packs over bundled translations and support locale switching.

1.5.0

  • Add MakeMeHappy branding and rename the plugin folder and text domain.
  • Remove the custom CSS editor, saving and rendering of raw CSS.
  • Preserve historical PDFs; flag missing legacy files for restoration.
  • Use standard WordPress language packs instead of bundled translations.

1.4.1

  • Simplify the PDF filename settings by removing the archive implementation note.

1.4.0

  • Store one document record and one PDF per distinct text, title and PDF style.
  • Save compact document references in new orders instead of duplicate text.
  • Set order-specific filenames on email attachments without creating per-order files.
  • Reuse archived PDFs and prevent simultaneous generation from rewriting an active attachment.
  • Consolidate 1.3.0 historical copies in bounded background batches and on email use.

1.3.0

  • Preserve the terms and PDF settings with every new submitted order, including HPOS and Checkout Block orders.
  • Use the saved document for all subsequent order email attachments.
  • Show the saved document or a missing-history notice in order administration.
  • Prevent generated PDFs with equal filenames from overwriting different orders.
  • Load translations on demand, with official language packs preferred and bundled SK/CZ files as fallback.
  • Require WordPress 6.6 for the language-directory fallback hook.

1.2.0

  • Rename the plugin to Terms Publisher for WooCommerce and use a matching folder, main file and text domain.
  • Use the unique mmhtp_ prefix and [mmhtp_terms_conditions] shortcode.
  • Preserve legacy settings and the old shortcode as a compatibility alias.
  • Remove license gating and the external updater; keep all existing features free.
  • Prevent duplicate attachments while the old edition is active.
  • Preserve explicitly disabled email recipient options in the settings form.
  • Correct the separator before custom PDF CSS.
  • Update Dompdf to 3.1.6 for PHP 8.4 compatibility and current fixes.

1.1.0

  • Earlier separately distributed paid edition, Woo Terms Publisher.