Skip to content

Instantly share code, notes, and snippets.

@corsonr
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corsonr/5a619439eee6b57e6959 to your computer and use it in GitHub Desktop.
Save corsonr/5a619439eee6b57e6959 to your computer and use it in GitHub Desktop.
WPdonations: Remove an Existing field
// Add your own function to filter the fields
add_filter( 'submit_donation_form_fields', 'remove_submit_donation_form_fields' );
// This is your function which takes the fields, modifies them, and returns them
// You can see the fields which can be changed in: includes/forms/class-wpdonations-form-submit-donation.php
function remove_submit_donation_form_fields( $fields ) {
// Here we remove one of the donation fields (donation_campaign)
unset($fields['donation']['donation_campaign']);
// And return the modified fields
return $fields;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment