Last active
April 7, 2021 17:14
-
-
Save barryhughes/d17134dc83dd216555115182879da5f4 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
-- Delete WooCommerce session data for a specific user. | |
DELETE session_data, | |
session_meta | |
FROM wp_woocommerce_sessions AS session_data | |
JOIN wp_usermeta AS session_meta ON | |
session_meta.user_id = session_data.session_key | |
-- Set the `session_key` value to the target `user_id`. | |
WHERE session_key = 12345 | |
AND ( | |
meta_key = 'session_tokens' | |
OR meta_key LIKE '_woocommerce_persistent_cart_%' | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment