ecommerce

Shopping Cart (WordPress / WooCommerce Glossary)

A shopping cart is a temporary session-based container on a WooCommerce store that holds a customer's selected products before they proceed to checkout. It tracks item quantities, applied coupons...

Shopping Cart

A shopping cart is a temporary session-based container on a WooCommerce store that holds a customer’s selected products before they proceed to checkout. It tracks item quantities, applied coupons, and calculated totals in real time, then passes that data to the checkout page when the customer is ready to pay.

Last verified: April 2026


What is a shopping cart in WordPress?

In WordPress, “shopping cart” refers specifically to the cart functionality added by an ecommerce plugin—most commonly WooCommerce. WordPress core has no native cart. WooCommerce creates a dedicated /cart page automatically on installation and stores cart contents in a PHP session or browser cookie until the order is placed or the session expires (default: 48 hours).


How does a WooCommerce shopping cart work?

When a visitor clicks Add to Cart, WooCommerce writes the product ID, quantity, and variation data to the session. The cart page reads that session, calculates subtotals, applies any active discount codes, and estimates shipping. No database row is created until checkout is completed—cart data lives in wp_options under the _woocommerce_persistent_cart key for logged-in users, or in a cookie for guests.

On client sites we manage, we see this session behavior catch people off guard: clearing the site cache can wipe guest carts mid-session. If your caching plugin is set to cache pages for logged-out users, exclude the /cart and /checkout URLs from caching rules.


What is cart abandonment?

Cart abandonment happens when a shopper adds items to the cart but leaves without completing checkout. The Baymard Institute puts the average documented cart abandonment rate at 70.19% across 50 studies. For a WooCommerce store, recovering even a fraction of those sessions—through automated email follow-ups or exit-intent popups—directly impacts revenue without increasing traffic.


How to configure the WooCommerce cart page

WooCommerce generates a [woocommerce_cart] shortcode page on setup. You can reassign which page acts as the cart under WooCommerce → Settings → Advanced → Page setup. When we installed WooCommerce on a fresh WordPress 6.5 site in our testing, this page was created automatically and linked in the top navigation by the Storefront theme.

Key configuration options:

  • Enable AJAX add-to-cart (WooCommerce → Settings → Products): updates the cart count in the header without a page reload
  • Shipping calculator: shown on the cart page by default; disable it under WooCommerce → Settings → Shipping if you only ship to one region
  • Cross-sells: products displayed on the cart page as suggestions; set per product under the Linked Products tab

  • Checkout page — the step after the cart where payment and address details are collected
  • WooCommerce — the plugin that powers cart functionality in WordPress
  • Cart abandonment recovery — strategies and plugins for recapturing incomplete orders
  • Session — the server-side mechanism that stores temporary cart data
  • Persistent cart — a WooCommerce feature that saves cart contents for logged-in users across devices

Additional reading