Created
November 16, 2015 23:15
-
-
Save joshmiller83/5e9adbdc2906cc1de552 to your computer and use it in GitHub Desktop.
Quickly decouple a user's current cart from Drupal Commerce 7.x
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
<?php | |
// Only meant for quick development issues where the current order | |
// is somehow borked. | |
global $user; | |
$order_id = commerce_cart_order_id($user->uid); | |
db_query("UPDATE commerce_order SET uid = 0 WHERE order_id=".$order_id)->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment