[2.6] Handle object when generate_cart_id is used.

Closes #11767
This commit is contained in:
Mike Jolley 2016-08-25 10:54:24 +01:00
parent 921f7e3fb7
commit 3c13ce6fcd
1 changed files with 1 additions and 2 deletions

View File

@ -865,8 +865,7 @@ class WC_Cart {
if ( is_array( $cart_item_data ) && ! empty( $cart_item_data ) ) {
$cart_item_data_key = '';
foreach ( $cart_item_data as $key => $value ) {
if ( is_array( $value ) ) {
if ( is_array( $value ) || is_object( $value ) ) {
$value = http_build_query( $value );
}
$cart_item_data_key .= trim( $key ) . trim( $value );