• Resolved andreacomplus

    (@andreacomplus)


    Order page is broken when certain products are in the cart, the critical error is :

    TypeError: implode(): Argument #1 ($array) must be of type array, string given

    The error generates in : /wp-content/plugins/collect-and-deliver-interface-for-woocommerce/includes/CDI-Reference-Livraisons.php:333

    The culprit is :

     implode(',', $chosen_products)

    $chosen_products should be casted to an array when retrieved from the session on line 298, like this:

    $chosen_products = (array) WC()->session->get( 'cdi_chosen_products' );

    and on line 304 it should be defined as an empty array, not as null, like this:

    $chosen_products = [];

    Please fix this ASAP, we’ve lost many orders for this bug.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @andreacomplus

    J’ai exactement ce même message, il est indiqué “résolu” a ton problème, mais comment as tu fais ? ?? Un Maj de CDI ? Parce que pour moi tout est à jour, mais j’ai bien les mêmes messages d’erreur…
    merci de ton aide.

    Aurélien.

    Thread Starter andreacomplus

    (@andreacomplus)

    Hello @macomamoi,

    j’ai fait une patch en dur dans le code du module, car ils n’ont jamais répondu. La version 5.3.4 a toujours ce bug. La correction faite est exactement celle décrite dans le message.

    Si t’as besoin d’aide n’hésite pas, au pire je pourrais publier sur Github le repo avec la correction.

    Hello @macomamoi I have a question for you, please let me know you can help me: https://www.ads-software.com/support/topic/unable-to-change-account-profile-picture/
    Can you tell me how you solved this please? I have the same problem but no one helping me on this. Thank you! I know this is not the right thread but please let me know!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Erreur critique CDI-Reference-Livraisons.php:333’ is closed to new replies.