Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

WP Member – Time format of member expiry date

by

Tips and Tricks HQ Support Portal › Forums › WP eMember › WP eMember General Questions › WP Member – Time format of member expiry date

Tagged: change date format, date format, expiry date formate, login widget date, widget

  • This topic has 10 replies, 6 voices, and was last updated 10 years ago by admin.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • July 21, 2011 at 11:22 am #3852
    ramona
    Participant

    I have to change the date format (timestamp) in my login widget in that way: d.m.Y.

    What file must I modify?

    July 21, 2011 at 11:33 pm #34509
    amin007
    Participant

    Search for the following line of code from the “wp_eMember1.php” file and change it to whatever you like:

    $sub_expires = date('F j, Y',strtotime("+" . $auth->my_subscription_duration . " days ", $sub_start));

    July 22, 2011 at 10:23 am #34510
    ramona
    Participant

    Fine, thank you.

    July 23, 2011 at 8:24 am #34511
    ramona
    Participant

    Changed it to j. F Y. But even I have set German language there are the English words for the month (e.g. July instead of Juli). Cannot find a hint in the language file.

    July 24, 2011 at 12:27 am #34512
    amin007
    Participant

    The date value comes directly from your server’s PHP engine. When using the date function you might be able to specify the language that you want PHP to use in order to output the date value.

    September 4, 2011 at 8:28 pm #34513
    blatternet
    Member

    Did you change something? I can’t find the string

    $sub_expires = date(‘F j, Y’,strtotime(“+” . $auth->my_subscription_duration . ” days “, $sub_start));

    in wp_eMember1.php (eMember 7.0.4).

    September 5, 2011 at 1:51 am #34514
    admin
    Keymaster

    Yeah we moved some code around to make them more modular. On newer build of eMember you will find that line in the following file:

    eMember_auth_utils.php

    September 5, 2011 at 3:35 am #34515
    blatternet
    Member

    Cool, thank you!

    December 17, 2011 at 7:30 pm #34516
    dboeckle
    Member

    For other Europeans who don’t know much about php (like me) this could be another solution:

    $sub_expires = date(‘d.m.y’,strtotime(“+” . $auth->my_subscription_duration . ” days “, $sub_start));

    “d.m.y” will show the following date format: 17.12.2011

    Please correct me if I am wrong.

    Have a good time

    David

    March 9, 2013 at 2:52 pm #34517
    compass international
    Member

    I am trying to change the date format in the login widget, too. (Instead of: Your Account Expires: 15-03-2013 it should be Your Account Expires: 15. 03. 2013)

    I don’t find the described code in eMember_auth_utils.php. Has the procedure changed? Or is there an easier way now?

    March 11, 2013 at 1:01 am #34518
    admin
    Keymaster

    Ideally, we like to use the same date format that you have set in the General settings of your WordPress installation. However, we have run into a little issue with non-english installation of WordPress.

    For the time being, you can modify the following function in the “eMember_misc_functions.php” file to change the date format:

    function emember_date_locale

    Modify this function to return the date value in any format you like.

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • WP PDF Stamper Documentation
  • WP Photo Seller Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial
  • WP Photo Seller Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2023 | Tips and Tricks HQ