Erreur critique CDI-Reference-Livraisons.php:333
-
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)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Erreur critique CDI-Reference-Livraisons.php:333’ is closed to new replies.