Clean before json_encode to ensure values are strings
#10937 @thenbrent
This commit is contained in:
parent
2108722027
commit
d9db29a035
|
@ -184,8 +184,8 @@ class WC_Checkout {
|
|||
'status' => apply_filters( 'woocommerce_default_order_status', 'pending' ),
|
||||
'customer_id' => $this->customer_id,
|
||||
'customer_note' => isset( $this->posted['order_comments'] ) ? $this->posted['order_comments'] : '',
|
||||
'cart_hash' => md5( print_r( WC()->cart->get_cart_for_session(), true ) . WC()->cart->total ),
|
||||
'created_via' => 'checkout'
|
||||
'cart_hash' => md5( json_encode( wc_clean( WC()->cart->get_cart_for_session() ) ) . WC()->cart->total ),
|
||||
'created_via' => 'checkout',
|
||||
);
|
||||
|
||||
// Insert or update the post data
|
||||
|
|
Loading…
Reference in New Issue