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.8.7.0

apply_filters('woocommerce_user_last_update_fields') is found 1 times:

  • /includes/wc-user-functions.php line 819
     * @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' ) );
    
    	$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 ) {