Skip to content

Instantly share code, notes, and snippets.

@psaikali
psaikali / woocommerce-custom-checkout-fields.php
Created December 28, 2019 13:05
Add custom WooCommerce checkout fields, add an extra fee to the cart, validate the fields before processing the order and save them on the order metadata.
<?php
/**
* Plugin Name: WooCommerce Custom Checkout Fields
* Description: Add some custom "emergency level" extra fields on the WooCommerce Checkout page. Save this custom data in each order metadata.
* Author: Pierre Saïkali
* Author URI: https://saika.li
* Text Domain: wc_ccf
* Domain Path: /languages/
* Version: 1.0.0
* Full Tutorial: https://mosaika.fr/personnaliser-tunnel-commande-woocommerce/