| 开发者 |
giannis4
rbraffin termsperproduct thewpgarden |
|---|---|
| 更新时间 | 2026年10月13日 01:42 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.1 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[tacpp_terms] shortcode to show a product's Terms anywhere else.
✅ Optionally hide the default WooCommerce Terms checkbox when custom Terms apply.
✅ Filters and actions throughout, for developers. See the hooks reference.
✅ Translation ready.
Premium features
🗂️ Terms per product category and per product tag, so a whole range is covered by one setting.
📋 An acceptance log on the order screen: who accepted what, when, and which link they were shown. Useful the day a customer disputes a charge.
🪟 Open Terms in a modal instead of a new tab, for your Terms and for the default WooCommerce ones.
📦 WooCommerce Product Bundles support: let a bundle's Terms replace the Terms of the products inside it, or let a product skip its own Terms when it is sold inside a bundle.
See Premium plans and pricing.
Built for current WooCommerce
Block checkout is supported in full since 1.4.0, on WooCommerce 9.9 and above. The checkboxes render inside the checkout block, they rebuild themselves when the cart changes mid-checkout, and the acceptance is verified again through the Store API before stock is reserved or payment is taken. HPOS (High-Performance Order Storage) is supported on the order screens.
What this plugin does not do
It does not write your Terms and it is not legal advice. You host your Terms on your own page or PDF. The plugin links to them, requires the tick, and records it.
Documentation and support
📖 Documentation: setup and a guide for every feature, from adding Terms to products to block checkout and the acceptance log.
🛟 Support forum: questions and bug reports. We answer every topic.
✉️ Contact us: Premium support, and anything that is not a support question.
Like it?
A 5-star review is the most useful thing you can do for a small plugin. It takes a minute and helps other store owners find it.
More from The WP Garden
Terms and Conditions per Product is made and maintained by The WP Garden, small focused plugins for WooCommerce, BuddyPress and WordPress.
Edit the product, open the Advanced tab and paste the URL of the Terms page that applies to it. Repeat on the next product with a different URL. Each product carries its own, and a customer only ever sees the checkboxes for what is in their cart. On a variable product you can go a level deeper and set a different URL on each variation.
Yes, in the Premium version. Edit a product category or a product tag, set the Terms there, and every product in it is covered. A product with Terms of its own overrides the category. The plugin checks the variation first, then the product, then the category or tag, and the first level with a URL wins.
Yes. Each variation gets its own Terms and Conditions fields on the product edit screen. A variation with no Terms of its own falls back to the ones set on the parent product.
Yes, with the [tacpp_terms] shortcode. On a product page, or inside a product loop, it shows that product's Terms. Anywhere else, give it the product: [tacpp_terms product_id="123"]. A variation ID shows that variation's Terms. It only displays the link; the customer still accepts the Terms at checkout. Nothing is shown for a product without Terms.
Yes. By default every product inside a bundle asks for its own Terms, as well as the bundle. In the Premium version you can change that in two ways, both under Product data > Advanced. On the bundle, tick "Replace bundled products' Terms" so the bundle's Terms cover everything inside it. On a product, tick "Skip Terms inside a bundle" so it stops asking for its Terms whenever it is sold in a bundle. Either one only applies when the bundle has Terms of its own, and a product bought on its own always asks for its Terms.
Yes. The tacpp_order_terms_accepted action fires once per order, as soon as the order is created and before payment, with the Terms the customer ticked. It runs on the classic and the block checkout, in the free and the Premium version, whether or not the acceptance log is switched on. It does not fire for express payments, where no Terms are shown.
add_action( 'tacpp_order_terms_accepted', function ( $accepted_terms, $order, $checkout_type ) { foreach ( $accepted_terms as $term ) { // $term['url'], $term['text'], $term['type'], $term['product_id'], $term['variation_id'], $term['term_id'] error_log( sprintf( 'Order %d accepted %s', $order->get_id(), $term['url'] ) ); } }, 10, 3 );
$checkout_type is classic or block.
In the Premium version, every acceptance is written against the order. Open the order in the admin and the "User Accepted Terms" box lists what was accepted, when, and the exact Terms link the customer was shown, so you are not relying on what that page says today. It works on the classic and the block checkout, and on both legacy and HPOS order storage. The free version enforces the checkbox but keeps no record.
No plugin does that on its own. What this one gives you is a record that a named customer accepted a specific document, at a specific time, on a specific order, which is the part most stores are missing. Whether your Terms themselves and the rest of your data handling meet GDPR is a question for your lawyer.
Yes, since version 1.4.0, on WooCommerce 9.9 or newer. The Block Checkout then works the same way as the classic checkout:
No. Express payment buttons, such as Apple Pay, Google Pay and the PayPal button, sit above the checkout form and place the order straight from the payment sheet. The customer never reaches the Terms step, so there is nothing to tick and nothing to record, and the plugin lets those orders through rather than blocking them at a point where the customer cannot do anything about it. If you need consent recorded on every single order, turn off express payment buttons in your payment gateway's settings, so that all customers go through the checkout form.
It stops the obvious case. The checkbox stays disabled until the Terms link has been opened, on both the classic and the Block Checkout. This runs in the customer's browser, because opening a link is not something a website can confirm from the server. Treat it as a prompt to read the Terms, not as proof that they were read. What is recorded in the acceptance log is that the checkbox was ticked.
The checkboxes render through WooCommerce's own checkout hooks and inside the Checkout block, so any theme that uses the standard WooCommerce checkout should work. If yours does not, tell us in the support forum.
Yes. You can translate Terms and Conditions per Product into your language.
Open a topic in the WordPress.org support forum. Premium customers can also contact us directly.
At thewpgarden.com/docs/terms-and-conditions-per-product: setup, plus a guide for every feature.
Terms and Conditions are the rules and regulations that govern the use of a website or a service. They are also known as Terms of Service or Terms of Use.
[tacpp_terms] shortcode shows a product's Terms link anywhere on the site, for the current product or any product or variation by ID.tacpp_order_terms_accepted action. It fires once per order with the Terms the customer accepted, on both checkouts and in the free version, so developers can record consent or sync it elsewhere. See the FAQ.tacpp_log_acceptance_enabled filter now controls the acceptance log. Returning false turns logging and the order-screen box off; it cannot turn the log on in the free version.taccp_get_custom_terms_cart_item filter is renamed to tacpp_get_custom_terms_cart_item. The old, misspelled name still works but is deprecated and will be removed in a future version.after_uninstall action so uninstall events and user feedback are reported correctly.