Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Don't group products at cart – Woocommerce
add_filter('woocommerce_add_cart_item_data', 'namespace_force_individual_cart_items', 10, 2);
function namespace_force_individual_cart_items($cart_item_data, $product_id) {
$unique_cart_item_key = md5(microtime() . rand());
$cart_item_data['unique_key'] = $unique_cart_item_key;
return $cart_item_data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.