get_route() : ''; if ( 0 !== strpos( ltrim( $route, '/' ), AGENTDESK_REST_NAMESPACE ) ) { return $served; } if ( ! headers_sent() ) { header( 'Cache-Control: no-cache, no-store, must-revalidate, max-age=0' ); header( 'Pragma: no-cache' ); } return $served; }, 10, 4 ); /** * WooCommerce "coming soon" mode blanks the Elementor preview iframe; exclude the * editor/preview requests so the canvas renders for Woo + Elementor users. */ add_filter( 'woocommerce_coming_soon_exclude', function ( $is_excluded ) { if ( isset( $_GET['elementor-preview'] ) || isset( $_GET['elementor_library'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended return true; } return $is_excluded; }, 20 );