• 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_pre_update_data

wpmem_pre_update_data

Description

Action hook gets user update data after data is validated, but before the updates are inserted.

All of the _data hooks can be used in a similar manner. The differences are if the user data has
been inserted or not. All of it has passed validation by the time it gets to the hook.

Here is an example that will grab the user update data before insertion, and echo the array
results on screen.

Note: this is ONLY an example to show the fields and data that are passed
with this hook; the call to exit(); will stop execution before this user data is inserted.

The related hook for new registration is wpmem_pre_register_data.

Usage

add_action( 'wpmem_pre_update_data', 'my_reg_hook' );

function my_reg_hook( $fields ) 
{
	echo "<pre>"; print_r( $fields ); echo "</pre>";
	exit();
}

Code Snippet Library [Subscriber Content]

  • Generate Random User Display Name and Nickname
  • Add a Date of Birth Field with Dropdown Selections for Month, Day, and Year
  • Email Admin When a User Updates Registration Data
  • Custom form field validation: numeric 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