Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save tuanbbhero/b5bb7ec32b447e18ab9a4dc2671967e5 to your computer and use it in GitHub Desktop.
Save tuanbbhero/b5bb7ec32b447e18ab9a4dc2671967e5 to your computer and use it in GitHub Desktop.
add_action( 'woocommerce_review_order_before_submit', 'bbloomer_add_checkout_privacy_policy', 9 );
function bbloomer_add_checkout_privacy_policy() {
woocommerce_form_field( 'privacy_policy', array(
'type' => 'checkbox',
'class' => array('form-row privacy'),
'label_class' => array('woocommerce-form__label woocommerce-form__label-for-checkbox checkbox'),
'input_class' => array('woocommerce-form__input woocommerce-form__input-checkbox input-checkbox'),
'required' => true,
'label' => 'Do you understand that your order won\'t be processed until 13 June?',
));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment