Skip to content

Instantly share code, notes, and snippets.

@corsonr
Created May 20, 2014 08:36
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/101d4fa2c7178de9ca2a to your computer and use it in GitHub Desktop.
Save corsonr/101d4fa2c7178de9ca2a to your computer and use it in GitHub Desktop.
WPdonations: Editing Submit Donation Form Fields
// Add your own function to filter the fields
add_filter( 'submit_donation_form_fields', 'custom_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 custom_submit_donation_form_fields( $fields ) {
// Here we target one of the donation fields (donation_amount) and change it's label
$fields['donation']['donation_amount']['label'] = "Custom Label";
// 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