// Check if this is a WooCommerce shop page and Elementor is editing $is_shop_page = function_exists('is_shop') && is_shop(); $is_elementor_edit = false; if (isset($_GET['elementor-preview'])) { $is_elementor_edit = true; } if (defined('ELEMENTOR_VERSION') && class_exists('\Elementor\Plugin')) { if (\Elementor\Plugin::$instance->editor && \Elementor\Plugin::$instance->editor->is_edit_mode()) { $is_elementor_edit = true; } } // If Elementor is editing, redirect to use page template (handled by functions.php filter) if ($is_shop_page && $is_elementor_edit) { // The template_include filter in functions.php will handle this // Just continue with normal archive if filter didn't work }