Support » Plugin: WooCommerce » Months of WooCommerce Empty Cart issues.

  • I’ve been trawling through woocommerce issues for months and months in regards to a guest not being able to add products to a cart. I’ve literally checked everything. Here is a tick list of issues in case you come across the same problem…

    1. PHP Sessions. Make sure the correct webserver user/group can write to the session folder.
    2. Plugin conflictions. (Update, and Disable all)
    3. Theme conflictions. (Update theme, then try using the standard twenty fifteen)
    4. Permalink settings. Try the default wordpress URL structure. Try different Woocommerce URL Structures.
    5. Uninstall and reinstall woocommerce.
    6. Remove all woocommerce tables from DB after uninstallation of woocommerce.
    7. Remove all ‘%WC_%’ and ‘%Woo%’ entries from the wp_options table in DB.
    8. Clear the ‘Rewrite_rules’ entry in wp_options table in DB.
    8. Turn on Debug mode and check error logs.
    9. Check all MySQL settings, PHP settings (sessions.save_path), Apache VHOSTS conf files)
    10. Check all wp-config.php settings.

    However, all of this failed to help me. Finally, I realised that the cookies were not getting saved and that the following lines in the wp_config.php file were set:

    define(‘ADMIN_COOKIE_PATH’, ‘/’);
    define(‘COOKIE_DOMAIN’, ”);
    define(‘COOKIEPATH’, ”);
    define(‘SITECOOKIEPATH’, ”);

    Remove them!
    This then allowed the sessions to start working again because the cookies were set properly. The only reason I mention it is because I haven’t seen any other threads mention this in regards to the woocommerce cart not working properly. Maybe it’ll help someone.

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘Months of WooCommerce Empty Cart issues.’ is closed to new replies.