Skip to content

Instantly share code, notes, and snippets.

@xlplugins
Created December 18, 2025 12:47
Show Gist options
  • Select an option

  • Save xlplugins/aad003546575c964086c9ea1c0a00558 to your computer and use it in GitHub Desktop.

Select an option

Save xlplugins/aad003546575c964086c9ea1c0a00558 to your computer and use it in GitHub Desktop.
Funnelkit Checkout: Unset billing Document
add_filter( 'woocommerce_checkout_fields', 'custom_override_checkout_fields', 9999999 );
function custom_override_checkout_fields( $fields ) {
if(!$_POST['billing_document']){
unset( $fields['billing']['billing_document']['required'] );
}
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment