• Resolved jodamo5

    (@jodamo5)


    Hi. Overall I really like the plugin, but I’ve found one issue with the date.

    My WordPress site is set to d/m/Y for the date settings under the general WordPress settings. However on the packing slips it is showing the date format as USA dates (m/d/Y).

    I’m surprised the plugin doesn’t just pick up the WordPress settings automatically. (It would be great if this was adjusted to pick up the same settings).

    But is there any way to adjust it?
    I tried the code on your documentation site for changing the date format, but the change isn’t changing how the date displays on the packing slip:
    https://www.webtoffee.com/woocommerce-print-invoice-packing-slip-delivery-note-label-change-date-format/

    Is there a different hook that is needed in the free version? Or is there a different way to change the date format?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author WebToffee

    (@webtoffee)

    Hi @jodamo5,

    Please use the below filter to change the order date format. You will get the list of updated filters and examples under General Settings -> Help Guide > Filters

    add_filter('wf_pklist_alter_order_date', 'wf_pklist_alter_order_date_format', 10, 3);
    function wf_pklist_alter_order_date_format($order_date,$template_type,$order)
    {
    /* new date format */
    return date("d/m/Y",strtotime($order_date));
    }

    If you like the plugin, please leave us a review.

    Thread Starter jodamo5

    (@jodamo5)

    Thanks for the excellent reply. That fixed it. Sorry I didn’t spot the filters in the help section.

    I found them in the documentation section of your site – but it was just an image, so not searchable. Now I see it is right there in the plugin! On the “Help Links” screen, alongside the “Documentation” and “Help and Support” icon sections, can I suggest that an icon section for “Filters” gets added to? That would make it easier to find for new users.

    Also, just a thought – a number of the filters have example code, but the example code doesn’t actually include the add_filter line itself. It tripped me up briefly after copying and pasting the example code and wondering why it didn’t work. It could be beneficial to include the add_filter line into each of the examples.

    Overall, thanks for the very powerful plugin and excellent customer support. I’ll write a review.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Changing the Date Format’ is closed to new replies.