woocommerce_user_last_update_fields
Hooks into the update user meta function to set the user last updated timestamp.
Usage
add_filter( 'woocommerce_user_last_update_fields', 'wp_kama_woocommerce_user_last_update_fields_filter' );
/**
* Function for `woocommerce_user_last_update_fields` filter-hook.
*
* @param int $meta_id ID of the meta object that was changed.
*
* @return int
*/
function wp_kama_woocommerce_user_last_update_fields_filter( $meta_id ){
// filter...
return $meta_id;
}
- $meta_id(int)
- ID of the meta object that was changed.
Changelog
| Since 2.6.0 | Introduced. |
Where the hook is called
woocommerce_user_last_update_fields
woocommerce/includes/wc-user-functions.php 969
$keys_to_track = apply_filters( 'woocommerce_user_last_update_fields', array( 'first_name', 'last_name' ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment