woocommerce_user_last_update_fields

woocommerce_user_last_update_fields

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_user_last_update_fields') is found 1 times:

  • /includes/wc-user-functions.php line 903
     * @param string $meta_key    Name of the meta key that was changed.
     * @param mixed  $_meta_value Value of the meta that was changed.
     */
    function wc_meta_update_last_update_time( $meta_id, $user_id, $meta_key, $_meta_value ) {
    	$keys_to_track = apply_filters( 'woocommerce_user_last_update_fields', array( 'first_name', 'last_name' ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    
    	$update_time = in_array( $meta_key, $keys_to_track, true ) ? true : false;
    	$update_time = 'billing_' === substr( $meta_key, 0, 8 ) ? true : $update_time;
    	$update_time = 'shipping_' === substr( $meta_key, 0, 9 ) ? true : $update_time;
    
    	if ( $update_time ) {