• Resolved fuegoyamana

    (@fuegoyamana)


    Hello!

    I like to know it’s possible to disable relative dates in orders lists.

    As far i can see the first 24 hours the dates are showed as “1 hour ago”, “2 hours ago”, etc and we like to see the real date instead.

    Is this possible?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • You would to make a copy of:
    plugins/woocommerce/includes/admin/list-tables/class-wc-list-tables-orders.php
    and put it in functions.php for your child theme.

    WooCommerce should detect that you have a copy and use that in preference to its own.

    In the copy, adjust lines 233-241 to remove the first clause of the if statement. This is the “ago” code. Modest PHP skills will be needed.

    If WooCommerce issues a new version of that file, you’ll need to redo the change.

    Thread Starter fuegoyamana

    (@fuegoyamana)

    Thanks @lorro

    As far i can see commenting the “if” entirely and only allow line 240 do the trick.

    • This reply was modified 5 years, 8 months ago by fuegoyamana.

    Yes, but that would need to be done for every small point WC update. With the copy class method, updating would only be necessary when the class was updated, and the last class update was v3.3.

    Plugin Support John Coy a11n

    (@johndcoy)

    Automattic Happiness Engineer

    Hi @fuegoyamana

    We haven’t heard back from you in a while so we will mark this thread as closed. Please open a new thread should you have further questions.

    Thanks,

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How disable relative date in orders list?’ is closed to new replies.