Skip to content

Instantly share code, notes, and snippets.

@beefektu
beefektu / functions.php
Created September 4, 2021 12:51 — forked from corsonr/functions.php
WooCommerce: Add conditional checkout fields based on products in cart
<?php // Do not include this if already open! Code goes in theme functions.php.
/**
* Add fields to the checkout page based on products in cart.
*
* @how-to https://remicorson.com/?p=7871
* @author Remi Corson
* @testedwith WooCommerce 3.4.0
*/