Created
December 15, 2021 11:22
-
-
Save encoderit-arman/8b52931c92ac4eb4c24931fb756a7b64 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} | |
add_filter( 'woocommerce_add_cart_item_data', 'namespace_force_individual_cart_items', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment