Hide the CheckoutWC Side Cart elements from any page when the Elementor editor is active
The Problem
The CheckoutWC sidecart animation popout would trigger every time I updated / published the page when the Elementor editor was active.
The Solution
After reaching out to the CheckoutWC support team, they kindly shared a PHP function that hides the CheckoutWC sidecart elements when the Elementor editor is active. Thank you CheckoutWC support team, it works like a charm!!
Simply add the following code to the “PHP Scripts” section within the CheckoutWC settings.
CheckoutWC > Advanced > Scripts > PHP Scripts
The Code
function custom_inline_script_for_elementor() {
// Check if we are in the admin area and return early if we are not
if (is_admin()) {
return;
}
?>