get('order_hash', '')); // In the block editor the shortcode is rendered for preview with no // order in the URL, and a "we could not find that order" panel is a // poor thing to show an admin laying out the page. // The block editor previews it through the REST block renderer, with // no action parameter at all, so that request is a preview as well. $isEditorPreview = App::request()->get('action') === 'edit' || (defined('REST_REQUEST') && REST_REQUEST); if ($orderHash === '' && $isEditorPreview) { return ''; } ob_start(); // The page this shortcode sits on already prints its own title, so the // renderer's