• Resolved ahawtin

    (@ahawtin)


    Hi folks,

    great plug-in. We are doing a gradual upgrade to php 8 but ran into a problem on our French site. It would no longer accept tracking numbers with the following error:

    2022-02-10T12:47:53+00:00 CRITICAL Uncaught TypeError: date_format(): Argument #1 ($object) must be of type DateTimeInterface, bool given in /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking.php:1155
    Stack trace:
    #0 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking.php(1155): date_format()
    #1 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking.php(662): WC_Advanced_Shipment_Tracking_Actions->add_tracking_item()
    #2 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-includes/class-wp-hook.php(307): WC_Advanced_Shipment_Tracking_Actions->save_meta_box_ajax()
    #3 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #4 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-includes/plugin.php(474): WP_Hook->do_action()
    #5 /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-admin/admin-ajax.php(187): do_action()
    #6 {main}
      thrown dans /home/basicsby/domains/basicsbymail.com/public_html/francais/wp-content/plugins/woo-advanced-shipment-tracking/includes/class-wc-advanced-shipment-tracking.php à la ligne 1155

    We returned the site to php 7.4 and this restores the functionality. Please let me know if there is any more information we can offer to resolve this issue.

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Zorem

    (@zorem)

    How you add tracking information manually or via CSV?

    Thread Starter ahawtin

    (@ahawtin)

    Hey Zorem,

    we were adding tracking manually. Let us know if there is anything else we can do to narrow it down.

    Plugin Author Zorem

    (@zorem)

    Hi @ahawtin,
    We checked with adding tracking manually with PHP 8 and we couldn’t replicate this issue on our development store. Maybe you have a conflict with another plugin. Try to deactivate all other plugins except AST and WooCommerce and check again. If this solves the issue activate plugins one by one and check which plugin causes the conflict.
    Thanks,

    Thread Starter ahawtin

    (@ahawtin)

    Hello again and thank you for checking. This error only occurs only on the French site – not on the English site. Right now we are running php 8 on the English site and php 7.4 on the French site to work around this difficulty. In terms of extensions the only real difference between the two sites is loco translate. Plus the language declaration of course. I will first flip our staging site to French and see if the error occurs. Then if it does, disable loco translate.

    May I ask what language you were testing in?

    Thread Starter ahawtin

    (@ahawtin)

    The error occurs on the test site when we flip to French (specifically fr_CA). Just looking around at differences between the two sites (English vs French) and the date/time format is different due to preferences found in French Canada. Do you think that might be causing some difficulty?

    Have to pause a bit during this diagnosis to work on another issue. I will update when I get some time to play with the date/time format.

    Plugin Author Zorem

    (@zorem)

    Which date/time format do you use on the French website?

    Thread Starter ahawtin

    (@ahawtin)

    On the French site:
    23 février 2022 j F Y

    On the English site:
    February 23, 2022 Custom F j, Y

    Plugin Author Zorem

    (@zorem)

    I can replicate this issue with this date format on the french site. We will fix this issue in the next version of the plugin.

    Thread Starter ahawtin

    (@ahawtin)

    Excellent. Once I see the new release I will confirm the problem is fixed on the staging site and get back to you.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘PHP 8’ is closed to new replies.