Last active
August 29, 2015 14:01
-
-
Save corsonr/5a619439eee6b57e6959 to your computer and use it in GitHub Desktop.
WPdonations: Remove an Existing field
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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