I have a key like $cart_item_key = f7ebf06b2c9ff23e2efe046992eb949c
By default this key has an array (WC->cart->get_cart()
)
Array ( [f7ebf06b2c9ff23e2efe046992eb949c] =>
Array ( [unique_key] => 6bf1cd893cfb6ea388076bc99a08891a
[thwepof_options] =>
Array ( [order_date] =>
Array ( [name] => order_date
[value] => 06-02-2018, monday
[label] => Order date [options] => ) )
[key] => f7ebf06b2c9ff23e2efe046992eb949c
[product_id] => 770
[variation_id] => 771
[variation] => Array ( )
[quantity] => 1
) ) )
I didn't found any function in the WooCommerce documentation which helps me to solve this problem.
Originally this is how Woocommerce calls the cart items, but I filtered those keys which I need for the future development:
foreach( WC()->cart->get_cart() as $cart_item ) {
I found this solution on the forum but none of these worked.