• Resolved mygain

    (@mygain)


    Hi!

    I saw in another topic a snippet you provided to make the date format same for the email and frontend (below). Is this snippet usable for any site? It looks specific. Could you provide a snippet that works for any site?

    I’m using the Default Registration form and the date picker option. Using [j M Y] works fine for frontend but not in the email to admin.

    add_action("um_registration_complete","um_050621_change_date_format", 1, 2 );
    function um_050621_change_date_format( $user_id, $args ){
        $date = get_user_meta( $user_id, "yith_birthday", true );
        update_user_meta( $user_id, "yith_birthday", date_i18n("Y-m-d", strtotime( $date ) ) );
    }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Date format frontend and mail not the same’ is closed to new replies.