| @@ -327,11 +327,12 @@ | ||
| 327 | 327 | $key = sanitize_key( $request['key'] ); |
| 328 | 328 | |
| 329 | 329 | // ?document=1 → a standalone HTML document for the picker's Preview |
| 330 | 330 | // lightbox iframe (stylesheets, theme class and colours included), rather |
| 331 | - // than the bare fragment the original callers expect. It returns '' for a | |
| 332 | - // template with no layout of its own — a locked Pro card — and the client | |
| 333 | - // falls back to that template's screenshot. | |
| 331 | + // than the bare fragment the original callers expect. A template with no | |
| 332 | + // layout of its own — a locked Pro card on a free install — has nothing to | |
| 333 | + // render, so this 404s and the lightbox shows the card's screenshot (the | |
| 334 | + // builder does not request a locked card's document in the first place). | |
| 334 | 335 | if ( $request->get_param( 'document' ) ) { |
| 335 | 336 | $document = RendererService::build_template_preview_document( $key ); |
| 336 | 337 | if ( ! $document ) { |
| 337 | 338 | return new WP_REST_Response( [ 'message' => 'Template not previewable' ], 404 ); |