WooCommerce-specific troubleshooting for performance issues, tracking problems, and eCommerce functionality conflicts. This guide addresses issues unique to the WooCommerce ecosystem.
Common WooCommerce Issues
Performance Problems
WooCommerce stores face unique performance challenges:
- Largest Contentful Paint (LCP) - Product images, cart fragments AJAX, slow queries
- Cumulative Layout Shift (CLS) - Product variations, dynamic pricing, review widgets
- First Input Delay (FID) - Cart fragments, quantity selectors, checkout validation
- Total Blocking Time (TBT) - Heavy product scripts, variation swatches, payment gateways
See:
- LCP Troubleshooting - WooCommerce LCP fixes
- CLS Troubleshooting - Layout shift solutions
Tracking and Analytics Issues
WooCommerce's AJAX-heavy architecture creates tracking challenges:
- Events not firing - AJAX cart conflicts, caching interference, JavaScript errors
- Duplicate tracking - Multiple plugins, page refresh issues
- Missing eCommerce data - Product IDs incorrect, cart fragments not tracked
- Purchase events on refresh - No deduplication logic
See:
- Events Not Firing - Debug WooCommerce tracking
WooCommerce-Specific Debugging Tools
WooCommerce System Status
Access diagnostic information:
Navigate to WooCommerce → Status
Review:
WooCommerce Logs
Check WooCommerce logs for errors:
Location: WooCommerce → Status → Logs
Look for:
- Payment gateway errors
- Shipping calculation failures
- Product sync issues
- API connection problems
Browser Developer Tools
Essential for diagnosing WooCommerce issues:
Console (JavaScript Errors):
// Check for common WooCommerce objects
console.log(window.wc_cart_fragments_params); // Cart fragment settings
console.log(window.woocommerce_params); // WooCommerce params
console.log(window.WC); // WooCommerce global (if available)
console.log(window.dataLayer); // GTM data layer
console.log(window.gtag); // GA4
console.log(window.fbq); // Meta Pixel
Network Tab:
- Filter by
?wc-ajax=to see WooCommerce AJAX calls - Check for failed cart fragment updates
- Monitor add_to_cart AJAX requests
- Verify checkout validation calls
Performance Tab:
- Record add to cart action
- Identify slow WooCommerce AJAX calls
- Check cart fragments impact on performance
WooCommerce Query Monitor
Use Query Monitor plugin to debug:
// Install Query Monitor plugin
// Navigate to WooCommerce pages
// Check toolbar for:
// - Database queries (slow WooCommerce queries)
// - AJAX requests
// - WooCommerce-specific hooks fired
// - Cart/session queries
Common WooCommerce Conflicts
Plugin Conflicts
Symptoms:
- Cart not updating
- Checkout broken
- Product pages not loading
- Tracking stops working
Diagnosis:
- Enable Safe Mode (Health Check plugin)
- Disable all plugins except WooCommerce
- Re-enable plugins one by one
- Test cart, checkout, and tracking after each
Common Culprits:
- Multiple analytics plugins (MonsterInsights + GA Google Analytics + PixelYourSite)
- Aggressive caching plugins interfering with cart
- Security plugins blocking WooCommerce AJAX
- SEO plugins modifying product schema
Cart Fragments Conflicts
What are Cart Fragments?
WooCommerce uses AJAX to update cart without page reloads:
// Cart fragments refresh every page load
// Can impact performance significantly
Symptoms:
- Slow page load times
- High Time to Interactive (TTI)
- Add to cart events not tracked
- Cart count not updating
Solutions:
Option 1: Disable Cart Fragments (if not needed)
// Disable cart fragments completely
add_action('wp_enqueue_scripts', 'disable_cart_fragments', 999);
function disable_cart_fragments() {
if (is_front_page() || is_page()) {
wp_dequeue_script('wc-cart-fragments');
}
}
Option 2: Reduce Cart Fragment Frequency
// Reduce cart fragment AJAX calls
add_filter('woocommerce_cart_fragment_refresh', 'reduce_cart_fragment_refresh');
function reduce_cart_fragment_refresh($refresh) {
// Only refresh on cart/checkout pages
if (is_cart() || is_checkout()) {
return $refresh;
}
return false;
}
Option 3: Cache Cart Fragments
// Increase cart fragment cache duration
add_filter('wc_session_expiration', 'extend_cart_session');
function extend_cart_session($expiration) {
return DAY_IN_SECONDS * 7; // 7 days instead of 2
}
Caching Plugin Issues
Symptoms:
- Cart shows old prices
- Checkout displays cached content
- Tracking shows stale product data
- Payment gateways fail
Solutions:
For WP Rocket:
// Exclude WooCommerce pages from caching
add_filter('rocket_cache_reject_uri', 'exclude_woocommerce_pages');
function exclude_woocommerce_pages($uri) {
$uri[] = '/cart/';
$uri[] = '/checkout/';
$uri[] = '/my-account/';
$uri[] = '/shop/';
return $uri;
}
// Exclude WooCommerce cookies
add_filter('rocket_cache_reject_cookies', 'exclude_woocommerce_cookies');
function exclude_woocommerce_cookies($cookies) {
$cookies[] = 'woocommerce_items_in_cart';
$cookies[] = 'woocommerce_cart_hash';
return $cookies;
}
// Exclude tracking scripts from optimization
add_filter('rocket_exclude_js', 'exclude_tracking_from_optimization');
function exclude_tracking_from_optimization($excluded) {
$excluded[] = 'googletagmanager.com/gtag/js';
$excluded[] = 'connect.facebook.net/en_US/fbevents.js';
return $excluded;
}
For W3 Total Cache:
Performance → Page Cache → Never cache the following pages:
/cart/
/checkout/
/my-account/
/shop/
Performance → Minify → Never minify the following JS files:
googletagmanager.com
google-analytics.com
connect.facebook.net
For LiteSpeed Cache:
Cache → Excludes → Do Not Cache URIs:
cart
checkout
my-account
shop
Cache → Excludes → Do Not Cache Cookies:
woocommerce_items_in_cart
woocommerce_cart_hash
Page Optimization → JS Excludes:
googletagmanager.com
google-analytics.com
Variable Product Issues
Symptoms:
- Variations not loading
- Wrong prices displayed
- Tracking shows parent product instead of variation
- Add to cart doesn't work for variations
Common Issues:
- JavaScript Errors:
// Check console for variation errors
console.log(jQuery('.variations_form').length); // Should be > 0
- Missing Variation Data:
// Ensure variation data is properly set
add_filter('woocommerce_available_variation', 'check_variation_data', 10, 3);
function check_variation_data($data, $product, $variation) {
error_log('Variation Data: ' . print_r($data, true));
return $data;
}
- Tracking Variation Selection:
// Track variation changes
add_action('woocommerce_after_add_to_cart_button', 'debug_variation_tracking');
function debug_variation_tracking() {
global $product;
if ($product->is_type('variable')) {
?>
<script>
jQuery('.variations_form').on('found_variation', function(event, variation) {
console.log('Variation found:', variation);
});
</script>
<?php
}
}
Payment Gateway Issues
Symptoms:
- Checkout fails
- Purchase events don't fire
- Orders stuck in "pending payment"
Diagnosis:
Check Payment Gateway Logs:
- WooCommerce → Status → Logs
- Look for gateway-specific errors
Verify Callback URLs:
Test Mode:
- Enable test/sandbox mode
- Complete test purchase
- Verify payment flow
WooCommerce Performance Issues
Slow Product Pages
Common Causes:
- Unoptimized product images
- Too many product reviews loading
- Related products query slow
- Heavy theme/page builder
Solutions:
// Reduce related products query
add_filter('woocommerce_output_related_products_args', 'reduce_related_products');
function reduce_related_products($args) {
$args['posts_per_page'] = 3; // Show only 3 instead of default
return $args;
}
// Lazy load product images
add_filter('wp_lazy_loading_enabled', '__return_true');
// Disable unused WooCommerce scripts on non-shop pages
add_action('wp_enqueue_scripts', 'disable_woocommerce_scripts', 99);
function disable_woocommerce_scripts() {
if (!is_woocommerce() && !is_cart() && !is_checkout()) {
wp_dequeue_style('woocommerce-general');
wp_dequeue_style('woocommerce-layout');
wp_dequeue_style('woocommerce-smallscreen');
wp_dequeue_script('wc-add-to-cart');
}
}
Slow Checkout
Common Causes:
- Payment gateway loading slowly
- Shipping calculations complex
- Checkout validation scripts heavy
- Too many checkout fields
Solutions:
// Remove unused checkout fields
add_filter('woocommerce_checkout_fields', 'remove_checkout_fields');
function remove_checkout_fields($fields) {
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_address_2']);
unset($fields['order']['order_comments']);
return $fields;
}
// Optimize shipping calculations
add_filter('woocommerce_shipping_packages', 'optimize_shipping_packages');
function optimize_shipping_packages($packages) {
// Cache shipping calculations
return $packages;
}
High Database Queries
Diagnosis:
// Enable query logging
define('SAVEQUERIES', true);
// At end of page, output queries
add_action('wp_footer', 'show_woocommerce_queries');
function show_woocommerce_queries() {
if (current_user_can('manage_options')) {
global $wpdb;
echo '<pre>';
print_r($wpdb->queries);
echo '</pre>';
}
}
Solutions:
- Enable object caching (Redis/Memcached)
- Index WooCommerce database tables
- Use transients for expensive queries
- Limit product queries per page
Testing WooCommerce Sites
Local Testing Environment
Local WooCommerce Setup:
- Local by Flywheel - Quick WooCommerce setup
- XAMPP - Full LAMP stack
- Docker - Containerized environment
Staging Environment: Host-provided staging:
- WP Engine: Automatic staging with WooCommerce
- Kinsta: One-click staging
- SiteGround: Staging for WooCommerce
- Cloudways: Staging environment
Testing Checklist
Before deploying changes:
Test Complete Purchase Flow
- Browse products
- Add to cart (AJAX and non-AJAX)
- View cart
- Apply coupon
- Begin checkout
- Complete purchase
- Verify confirmation email
Test Tracking
- Verify all events fire
- Check product data accuracy
- Confirm purchase deduplication
- Test with ad blockers enabled
Test Variations
- Select different variations
- Verify prices update
- Check tracking includes variation data
Test Performance
- Run Lighthouse audit
- Check Core Web Vitals
- Test cart fragments impact
- Verify caching works correctly
Getting Help
WooCommerce Support Resources
- WooCommerce Documentation
- WooCommerce Support Forums
- WooCommerce Developer Docs
- WooCommerce Slack Community
Plugin-Specific Support
- MonsterInsights: Support Portal
- Facebook for WooCommerce: Documentation
- PixelYourSite: Documentation
Next Steps
Dive into specific troubleshooting areas:
- LCP Issues - WooCommerce LCP optimization
- CLS Issues - Layout shift fixes
- Tracking Issues - Debug events not firing
Related Resources
- Global Issues Hub - Universal troubleshooting concepts
- WooCommerce Integrations - Set up tracking correctly
- WooCommerce Performance Guide