Skip to content

Instantly share code, notes, and snippets.

View diegomox's full-sized avatar
💻

Diego González diegomox

💻
  • Asturias, Spain
View GitHub Profile
@diegomox
diegomox / woocommerce-save-terms-conditions-user-acceptance-checkout.php
Last active February 12, 2024 09:22
Allows to save in the Woocommerce order a proof that the terms and conditions were accepted by the customer.
<?php
/**
* @snippet WooCommerce: Save “Terms & Conditions” Acceptance @ Checkout
* @author Diego González - diegomox
* @compatible WooCommerce 8
* @source This code is adapted from: https://www.businessbloomer.com/woocommerce-save-terms-conditions-user-acceptance-checkout
*/
use Automattic\WooCommerce\Utilities\OrderUtil;