BEAR - WooCommerce Bulk Editor and Products Manager Professional

How to Fix Description Not Updating When Using BEAR with Elementor

If you’re using BEAR (Bulk Editor) to update product descriptions, but changes don’t appear on the frontend when using Elementor page builder, this guide will solve the issue.

The Problem

Symptom: When you edit product descriptions through BEAR, the changes save correctly in the database, but the frontend still displays the old content.

What’s Happening: Elementor has an internal caching system that stores CSS and page data to speed up your website. When BEAR updates the product description, the data is saved correctly, but Elementor continues to display the cached version of the page until its cache is manually cleared or regenerated.

This is NOT a bug in BEAR or Elementor – it’s a compatibility issue between bulk editing and Elementor’s caching mechanism. Elementor doesn’t automatically detect when products are updated via bulk operations, so its cache remains stale.

Why This Only Happens with Elementor

On regular products (without Elementor): Changes appear immediately because WordPress displays content directly from the database.

On Elementor-built pages: Elementor generates static CSS and HTML files stored in /wp-content/uploads/elementor/css/. These cached files are served to visitors instead of querying the database each time. This dramatically speeds up page loads but means updates don’t appear until the cache is cleared.

The Solution

Add code to your theme’s functions.php that automatically clears Elementor’s cache whenever a product is updated through BEAR.

Solution 1: Clear All Elementor Cache (Recommended)

This solution clears Elementor’s global cache after each product update. It’s simple, effective, and works for all scenarios.

Add this code to your child theme’s functions.php:

/**
 * Clear Elementor cache after product update via BEAR
 * This ensures description changes appear immediately on frontend
 */
add_action('woocommerce_update_product', 'woobe_clear_elementor_cache', 10, 1);

function woobe_clear_elementor_cache($product_id) {
    // Check if Elementor is active
    if (!did_action('elementor/loaded')) {
        return;
    }

    // Clear Elementor global cache
    if (class_exists('\Elementor\Plugin')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }
}

How it works:

  • Triggers every time WooCommerce updates a product (including BEAR updates)
  • Checks if Elementor is active
  • Clears all Elementor CSS and data cache
  • Elementor automatically regenerates cache on next page load

Pros:

  • Simple and reliable
  • Works for all products
  • No product-specific logic needed

Cons:

  • Clears cache for all pages, not just the updated product
  • Slight performance impact on large sites with many Elementor pages

 

Solution 2: Regenerate CSS for Specific Product Only

This solution only regenerates CSS for the specific product being updated. More efficient for large sites.

Add this code to your child theme’s functions.php:

/**
 * Regenerate Elementor CSS for specific product after update
 * More efficient - only regenerates CSS for the updated product
 */
add_action('woocommerce_update_product', 'woobe_regenerate_product_elementor_css', 10, 1);

function woobe_regenerate_product_elementor_css($product_id) {
    // Check if Elementor is active
    if (!did_action('elementor/loaded')) {
        return;
    }

    if (!class_exists('\Elementor\Plugin')) {
        return;
    }

    // Check if this product page is built with Elementor
    $document = \Elementor\Plugin::$instance->documents->get($product_id);
    
    if ($document AND $document->is_built_with_elementor()) {
        // Regenerate CSS for this specific product
        $css_file = \Elementor\Core\Files\CSS\Post::create($product_id);
        $css_file->update();
        
        // Clear product cache
        delete_post_meta($product_id, '_elementor_css');
    }
}

How it works:

  • Triggers when product is updated
  • Checks if the product page uses Elementor
  • Regenerates CSS only for that specific product
  • More efficient than clearing all cache

Pros:

  • Only affects the updated product
  • Better performance on large sites
  • Doesn’t clear cache for unrelated pages

Cons:

  • Slightly more complex code
  • Only works if product page is built with Elementor

 

Solution 3: Clear Cache After Bulk Operations (Most Efficient)

If you’re doing bulk edits and updating hundreds of products at once, you don’t want to clear cache after every single product. This solution clears cache once after the entire bulk operation completes.

Add this code to your child theme’s functions.php:

/**
 * Clear Elementor cache once after bulk edit completes
 * Most efficient for bulk operations
 */
add_action('woobe_after_bulk_edit', 'woobe_clear_elementor_after_bulk');

function woobe_clear_elementor_after_bulk() {
    // Check if Elementor is active
    if (!did_action('elementor/loaded')) {
        return;
    }

    // Clear all Elementor cache
    if (class_exists('\Elementor\Plugin')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }
}

How it works:

  • Uses BEAR’s woobe_after_bulk_edit hook
  • Only clears cache ONCE after all products are updated
  • Much more efficient than clearing after each product

Pros:

  • Best performance for bulk operations
  • Cache cleared only once per bulk edit
  • Reduces server load significantly

Cons:

  • Only works for bulk operations
  • Doesn’t clear cache for single product updates

 

Solution 4: Combined Approach (Best of Both Worlds)

Combine Solutions 1 and 3 for the best balance of efficiency and coverage.

Add this code to your child theme’s functions.php:

/**
 * Combined approach: Clear cache after bulk operations
 * and for individual product updates
 */

// Track if we're in a bulk operation
global $woobe_bulk_operation_active;
$woobe_bulk_operation_active = false;

// Set flag when bulk operation starts
add_action('woobe_before_bulk_edit', function() {
    global $woobe_bulk_operation_active;
    $woobe_bulk_operation_active = true;
});

// Clear cache once after bulk operation completes
add_action('woobe_after_bulk_edit', function() {
    global $woobe_bulk_operation_active;
    $woobe_bulk_operation_active = false;
    
    if (!did_action('elementor/loaded')) {
        return;
    }

    if (class_exists('\Elementor\Plugin')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }
});

// Clear cache for individual product updates (not during bulk)
add_action('woocommerce_update_product', function($product_id) {
    global $woobe_bulk_operation_active;
    
    // Skip if we're in a bulk operation (cache will be cleared after)
    if ($woobe_bulk_operation_active) {
        return;
    }
    
    if (!did_action('elementor/loaded')) {
        return;
    }

    if (class_exists('\Elementor\Plugin')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }
}, 10, 1);

How it works:

  • Tracks whether a bulk operation is in progress
  • During bulk operations: Only clears cache once at the end
  • For individual updates: Clears cache immediately
  • Best of both worlds

Which Solution Should You Use?

Choose Solution 1 (Clear All Cache) if:

  • You have a small to medium-sized site
  • You edit products individually most of the time
  • You want the simplest solution
  • Performance isn’t a critical concern

 

Choose Solution 2 (Specific Product) if:

  • You have a large site with many Elementor pages
  • You only use Elementor for specific product pages
  • You want to minimize performance impact
  • You’re comfortable with slightly more complex code

 

Choose Solution 3 (Bulk Only) if:

  • You primarily use bulk editing
  • You rarely update individual products
  • Performance is critical
  • You’re doing large batch operations (100+ products)

 

Choose Solution 4 (Combined) if:

  • You use both individual and bulk editing
  • You want optimal performance in all scenarios
  • You have a large site
  • You want the most comprehensive solution

Testing Your Solution

After adding the code:

  1. Clear all caches (browser, WordPress, server) to start fresh
  2. Edit a product description through BEAR
  3. Open the product page on the frontend (not in Elementor editor)
  4. Hard refresh your browser (Ctrl+F5 or Cmd+Shift+R)
  5. Verify the change appears on the frontend

If changes still don’t appear:

  • Make sure you’re using a child theme
  • Verify Elementor is active: Check Plugins → Installed Plugins
  • Check for PHP errors: Enable WP_DEBUG in wp-config.php
  • Try Solution 1 first (simplest and most reliable)

Important Notes About Elementor Caching

What Elementor Caches:

  • CSS files: Stored in /wp-content/uploads/elementor/css/
  • Page structure: Dynamic content layout
  • Widget data: Elementor element configurations

What Clearing Cache Does:

  • Deletes old CSS files
  • Forces Elementor to regenerate styles
  • Applies latest content changes

What Clearing Cache Does NOT Do:

  • Delete your content – All product data remains intact
  • Break Elementor formatting – Layouts and designs are preserved
  • Remove Elementor designs – Only cach files are cleared, not design data

Performance Considerations:

  • After clearing cache, the first page load may be slightly slower
  • Elementor regenerates CSS files automatically on first visit
  • Subsequent visits will be fast again
  • This is normal behavior

Troubleshooting

Changes still don’t appear after adding code:

Problem: Elementor formatting disappeared
Solution: You may have accidentally deleted _elementor_data meta. Don’t use delete_post_meta($product_id, '_elementor_data') in your code. Only delete _elementor_css.

Problem: Code doesn’t seem to run
Solution:

  • Verify you’re editing in a child theme
  • Check PHP error logs for syntax errors
  • Make sure hook names are correct
  • Test with Solution 1 first

Problem: Cache clears but changes still not visible
Solution:

  • Clear your browser cache (Ctrl+F5)
  • Clear any WordPress caching plugin (WP Rocket, W3TC, etc.)
  • Clear server-level cache (check hosting dashboard)
  • Clear CDN cache if using Cloudflare or similar

Problem: Site is slower after clearing cache
Solution:

  • This is normal – cache is regenerating
  • First page load will be slower
  • Performance improves after cache rebuilds
  • Consider using Solution 3 or 4 for better performance

Caching Plugin Conflicts:

If you use other caching plugins (WP Rocket, W3 Total Cache, LiteSpeed Cache), you may need to clear their cache as well:

// Example: Also clear WP Rocket cache
add_action('woocommerce_update_product', function($product_id) {
    // Clear Elementor cache (from solutions above)
    if (class_exists('\Elementor\Plugin')) {
        \Elementor\Plugin::instance()->files_manager->clear_cache();
    }
    
    // Also clear WP Rocket cache
    if (function_exists('rocket_clean_post')) {
        rocket_clean_post($product_id);
    }
}, 10, 1);

Best Practices

  1. Always use a child theme – Theme updates will erase changes to parent theme
  2. Backup before adding code – Always backup functions.php before editing
  3. Test on staging first – Test code on a staging site if possible
  4. Monitor performance – Use tools like GTmetrix to monitor site speed
  5. Clear all caches when testing – Browser, WordPress, server, and CDN
  6. Choose the right solution – Balance simplicity vs. performance for your needs

Alternative: Manual Cache Clearing

If you prefer not to add code, you can manually clear Elementor cache after bulk editing:

  1. After updating products in BEAR
  2. Go to Elementor → Tools
  3. Click Regenerate Files & Data under “General” tab
  4. Click Save Changes
  5. Refresh your product pages

This works but requires manual action after each bulk edit operation.

Summary

The Problem: BEAR updates descriptions in database, but Elementor shows cached version

The Cause: Elementor’s internal caching doesn’t automatically detect bulk updates

The Solution: Add code to automatically clear Elementor cache after product updates

Best Simple Solution: Use Solution 1 (clear all cache after each update)

Best Performance Solution: Use Solution 4 (combined approach)

Key Code:

\Elementor\Plugin::instance()->files_manager->clear_cache();

This single line clears Elementor’s cache and forces regeneration on next page load.