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

apply_filters('woocommerce_user_last_update_fields') is found 1 times:

  • /includes/wc-user-functions.php line 958
    954
    955
    956
    957
    958
    959
    960
    961
    962
    963
    964
    * @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 ) {