• Skip to primary navigation
  • Skip to main content

RocketGeek

Home of WP-Members, The Original WordPress Membership Plugin

  • WordPress Plugins
    • WP-Members
      • FAQs
      • Quick Start
      • Documentation
      • Extensions
    • Advanced Options
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Download Protect
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Invite Codes
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • MailChimp Integration
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • PayPal Subscriptions
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Salesforce Web-to-Lead
    • Security
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Text Editor
      • Purchase the Plugin
      • Get the Pro Bundle
    • User List
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • User Tracking
      • Documentation
      • Purchase the Plugin
      • Get the Pro Bundle
    • Memberships for WooCommerce
    • WordPass
  • Blog
    • Basics
    • Tips and Tricks
    • Filters
    • Actions
    • Code Snippets
    • Shortcodes
    • Design
    • Release Announcements
  • Store
    • Cart
    • Checkout
  • Contact
  • Log In
  • Show Search
Hide Search
Home » Plugins » WP-Members » Documentation » Filter Hooks » wpmem_exclude_fields

wpmem_exclude_fields

Description

The wpmem_exclude_fields filter allows you to filter the meta keys of fields you want to exclude from being stored in the wp_usermeta table.

Note: be sure to only add to the array and not simply create your own. You want to be sure to include the password and email defaults so these are properly skipped.  Failure to do so could result in you storing data in the wp_usermeta table that you did not intend to keep.

Parameters

$fields
(array)(required) An array of the excluded fields.

Changelog

Introduced in version 2.9.3

Usage

add_filter( 'wpmem_exclude_fields', 'my_exclude_fields' );

function( $fields ) {

	// an array of extra fields to exclude
	$my_exclude_fields = array(
		'some_data_field',
		'some_other_data'
	);
	
	// IMPORTANT
	// Include the original exclude fields in your new array!
	$new_exclude_fields = array_combine( $fields, $my_exclude_fields );
	
	return $new_exclude_fields;
}
See a list of all filter and action hooks

Ready to get started?

Join Today!

© 2025 · butlerblog.com · RocketGeek is built using WordPress, WP-Members, and the Genesis Framework

  • butlerblog.com
  • WP-Members Support Subscription
  • Terms of Service
  • Privacy Policy
  • Refund Policy