Skip to content

Instantly share code, notes, and snippets.

@codelion7
Created January 18, 2017 21:40
Show Gist options
  • Save codelion7/f000ce031759d8db41ba04f95f83cb9c to your computer and use it in GitHub Desktop.
Save codelion7/f000ce031759d8db41ba04f95f83cb9c to your computer and use it in GitHub Desktop.
Removes the Website URL field from the list of required affiliate registration form fields
// Run if AffiliateWP is active
if ( class_exists( 'Affiliate_WP' ) ) {
/**
* Removes the Website URL field from the list of required affiliate registration form fields
*
* @return array
*/
function affwp_remove_url_field( $required_fields = array() ) {
// Remove url field
unset( $required_fields['affwp_user_url'] );
return $required_fields;
}
add_filter( 'affwp_register_required_fields', 'affwp_remove_url_field', 10, 1 );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment