Mixing carts between users
mexposito-agoravita opened this issue · comments
Prerequisites
- I have carried out troubleshooting steps and I believe I have found a bug.
- I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
When I add an item to cart_1, this item is also added to cart_2.
If I flush cart_2, cart_1 still has its item.
If I add another item to cart_1, cart_2 now has both items even though I previously flushed it.
I guess this issue could be related to my JWT authentication but I can't figure it out.
Expected behavior
Adding an item to my cart must not interfere with other carts
Actual behavior
Adding an item to my cart is adding the same item to other carts
Steps to reproduce
Make sure your 2 tests accounts have an empty cart
- Log in with account_1
- Add an item to cart
- Log out
- Log in with account_2
WEIRD BEHAVIOR 1 --> the previously item added to account_1 cart's is also in your account_2 cart's
- Flush your cart : it is now empty
- Log out
- Log in with account_1 : you still have your item in cart
- Add a second item to your cart
- Log out
- Log in with account_2
WEIRD BEHAVIOR 2 --> the previously flushed cart now has 2 items
WordPress Environment
WordPress Environment
WordPress address (URL):
Site address (URL):
WC Version:
REST API Version:
WC Blocks Version:
Action Scheduler Version:
Log Directory Writable:
rendez accessible en écriture ou définissez un WC_LOG_DIR personnalisé.
WP Version:
WP Multisite: –
WP Memory Limit:
WP Debug Mode: –
WP Cron: –
Language:
External object cache: –
Server Environment
Server Info:
PHP Version: -
PHP Post Max Size:
PHP Time Limit:
PHP Max Input Vars:
cURL Version:
SUHOSIN Installed: –
Max Upload Size:
Default Timezone is UTC:
fsockopen/cURL:
SoapClient:
DOMDocument:
et certaines extensions
ne fonctionneront pas sans DOMDocument.
GZip:
Multibyte String:
Remote Post:
Remote Get:
Database
WC Database Version:
WC Database Prefix:
Information de la base de données :: Impossible de récupérer les informations de la base de données. Ce n’est généralement pas un problème. Cela signifie simplement que votre installation utilise une classe qui remplace la classe de base de données de WordPress (par exemple
HyperDB) et que WooCommerce ne peut pas obtenir d’informations sur la base de données.
Security
Secure connection (HTTPS):
Votre boutique n’utilise pas HTTPS. En savoir plus sur HTTPS et les certificats SSL.
Hide errors from visitors:
Active Plugins (0)
Inactive Plugins (0)
Settings
API Enabled: –
Force SSL: –
Currency: ()
Currency Position:
Thousand Separator:
Decimal Separator:
Number of Decimals:
Taxonomies: Product Types:
Taxonomies: Product Visibility:
Connected to WooCommerce.com: –
Enforce Approved Product Download Directories:
WC Pages
Theme
Name:
Version:
Author URL:
Child Theme:
nous vous recommandons d’utiliser un thème enfant. Voir : Comment créer un thème enfant
WooCommerce Support:
Templates
Overrides: –
Product Bundles
Database Version: 6.17.3
Loopback Test:
Template Overrides: –
Admin
Enabled Features: activity-panels
analytics
coupons
customer-effort-score-tracks
experimental-products-task
experimental-import-products-task
experimental-fashion-sample-products
shipping-smart-defaults
shipping-setting-tour
homescreen
marketing
multichannel-marketing
mobile-app-banner
navigation
onboarding
onboarding-tasks
remote-inbox-notifications
remote-free-extensions
payment-gateway-suggestions
shipping-label-banner
subscriptions
store-alerts
transient-notices
woo-mobile-welcome
wc-pay-promotion
wc-pay-welcome-page
Disabled Features: minified-js
new-product-management-experience
settings
Daily Cron:
Options:
Notes: 71
Onboarding: completed
Action Scheduler
Terminé: 11 060
Oldest: 2023-01-30 15:57:33 +0100
Newest: 2023-03-02 09:00:32 +0100
En attente: 2
Oldest: 2023-03-02 17:31:48 +0100
Newest: 2023-03-02 17:31:48 +0100
CoCart
Version: 3.7.9
Database Version: 3.7.9
Install Date: 4 October 2022
Carts in Session: 115
Carts Active: 4 out of 115 in session.
Carts Expiring Soon: 0 out of 115 in session.
Carts Expired: 111 out of 115 in session.
Carts Source (by CoCart): 111
Carts Source (by Web): 0
Carts Source (by Other): 4
Status report information
Generated at: 2023-03-02 09:33:41 +01:00
Isolating the problem
- I have deactivated other plugins and confirmed this bug occurs when only CoCart plugin is active.
- I can reproduce this bug consistently using the steps above.
@mexposito-agoravita Your WordPress environment report is incomplete and from the information that is there it's saying that certain things are not even meeting requirements, at least for CoCart.
Can you please provide an none edited version along with copies of the code you are doing for each step. Also include the JWT steps so I have the full picture. This report is just to vague.