Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use print_r() to stringify cart session
Instead of json_encode(), because json_encode() takes types into account, meaning numbers may end up being represented in the encoded JSON as a string, e.g. "1" instead of 1, which can lead to the md5() being different between requests. This issue surfaces when creating a cart hash in a different request to the request to pay for the order, because after adding line items to the cart, the items quantity will be encoded with json_encode() as an int, but when encoding them in a different request, where they are coming from the database, they will be encoded as a string.
- Loading branch information