Skip to content

Instantly share code, notes, and snippets.

View craigedmonds's full-sized avatar

Craig Edmonds craigedmonds

  • JUCRA Digital SL
  • Marbella, Spain
View GitHub Profile
@craigedmonds
craigedmonds / woocommerce-conditional-gifts-add-ons.php
Last active November 22, 2021 04:41
WooCommerce conditional fields for gifts options on checkout
<?php
##############################
/*
Conditionally show gift add-ons if user checks a box saying they would like to send the order as a gift.
Created by [email protected] on 13th of July 2017
As default, WooCommerce simply displays ALL the add ons so makes the checkout form look very long.
This is useful if you want to show a checkbox on your checkout saying "Is this a gift order?"