• Resolved whirlpool

    (@whirlpool)


    For the past few weeks, the plugin has been displaying an incorrect date, consistently showing two days earlier than it should. The time in WordPress and on the server is accurate. How can I resolve this issue? Thank you for your assistance.

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author gaurav1092

    (@gaurav1092)

    Hi @whirlpool,

    Could you please let me know how you are currently adding the tracking information to your orders? Understanding your process will help us pinpoint the issue more effectively.

    Best Regards,
    Gaurav

    Thread Starter whirlpool

    (@whirlpool)

    Thank you for the quick response. The tracking numbers are generated by DHL and transmitted via an interface. Everything worked fine before, and there were no issues. However, the problem appeared after the plugin update. I have been dealing with this issue for almost a month. I changed the date format, but it didn’t help. The interface, WordPress, and DHL are all correct, and the time is also accurate.

    Plugin Author gaurav1092

    (@gaurav1092)

    Hi @whirlpool,

    Thank you for your detailed response. To investigate this further, could you please install the REST API Log plugin on your site? After installation, follow these steps:

    • Navigate to Tools > REST API Log.
    • Search for the API log entries related to "shipment-trackings".
    • Check how the shipped_date is passed in the API body.
    • Share the details or a screenshot of the specific API log entry with me so I can test it on our development store.

    This information will help us pinpoint the issue and provide a solution promptly. Let me know if you need assistance with these steps!

    Best Regards,
    Gaurav

    Thread Starter whirlpool

    (@whirlpool)

    Thank you for your response. I have installed the REST API Log and reviewed the shipment trackings—please see the screenshot. The plugin sets the shipping date two days earlier. With DHL, it is correct.

    Thread Starter whirlpool

    (@whirlpool)

    I noticed that when I use the MM/DD/YYYY format in the plugin’s API and set WordPress to MM/DD/YYYY as well, the date displays correctly. However, I would prefer to use the DD/MM/YYYY format, as it is the standard way dates are written and understood in Germany.

    Plugin Author gaurav1092

    (@gaurav1092)

    Hi @whirlpool,

    I reviewed the screenshots, and I see the issue. You’re passing the date_shipped parameter in the format that includes a time zone (e.g., 2024-11-20T00:00:00+01:00). This additional information could be causing the date to display incorrectly due to the timezone offset.

    Modify the date_shipped field in your API request to use only the date in the format YYYY-MM-DD. For example:

    "date_shipped": "2024-11-20"

    This should resolve the issue with the date format displaying incorrectly. Let me know if this resolves the issue!

    Best Regards,
    Gaurav

    Thread Starter whirlpool

    (@whirlpool)

    Hi, thanks for your response. Where and how can I change the date_shipped field? I don’t have access to the interface. Something likely needs to be changed in the plugin. As mentioned, everything was working fine before.

    Plugin Author gaurav1092

    (@gaurav1092)

    In the Shipment Tracking API settings, set the date format to MM/DD/YYYY, and in your WordPress settings, configure the date format to DD/MM/YYYY. After making these changes, please test again to see if the issue is resolved.

    Thread Starter whirlpool

    (@whirlpool)

    I wanted to make an update; it worked now with Shipment Tracking API settings MM/DD/YYYY and the WordPress settings set to DD/MM/YYYY. Thank you!

    Thread Starter whirlpool

    (@whirlpool)

    Unfortunately, the issue has resurfaced. As soon as the month was switched to December, all entries were recorded with incorrect times once again.

    Plugin Author gaurav1092

    (@gaurav1092)

    Thank you for letting us know. To address the issue, please ensure that the date format in your API is set to MM-DD-YYYY and try again. Let us know if the problem persists after making this change.

    Best regards,
    Gaurav

    Thread Starter whirlpool

    (@whirlpool)

    Unfortunately, all attempts have failed. Now, the date is being added in the correct format, but it sets it two days earlier, assigning 07/12/2024 instead of 09/12/2024.

    Plugin Author gaurav1092

    (@gaurav1092)

    Please modify the body parameter to pass only "2024-12-09" instead of the full timestamp "2024-12-09T00:00:00+01:00".

    This should resolve the issue with the incorrect date being assigned. Let me know if you encounter any further issues.

    Thread Starter whirlpool

    (@whirlpool)

    Thank you for your response. Could you please clarify where and how I should modify the body parameter? I’d appreciate it if you could explain this in more detail.

    Plugin Author gaurav1092

    (@gaurav1092)

    You will need to modify the body parameter in the part of your system where the API call is being made. Typically, this would be in the code or application that sends the tracking data to the WooCommerce API.

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.