Woocommerce checkout field required only if visible Woocommerce checkout field required only if visible wordpress wordpress

Woocommerce checkout field required only if visible


If the check is only client-side then instead of hiding it with display: none; you might want to remove it from the DOM. When you need it you append it again. You already have the toggle for it so.