Created
January 18, 2017 21:40
-
-
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
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
// 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