feat: set preferred_renderer when installing from catalog

This commit is contained in:
Benjamin Nussbaum 2025-11-04 22:53:47 +01:00
parent 3ae8a610a0
commit b98cda881e
3 changed files with 14 additions and 4 deletions

View file

@ -143,7 +143,7 @@ class PluginImportService
*
* @throws Exception If the ZIP file is invalid or required files are missing
*/
public function importFromUrl(string $zipUrl, User $user, ?string $zipEntryPath = null): Plugin
public function importFromUrl(string $zipUrl, User $user, ?string $zipEntryPath = null, $preferredRenderer = null): Plugin
{
// Download the ZIP file
$response = Http::timeout(60)->get($zipUrl);
@ -232,6 +232,7 @@ class PluginImportService
'render_markup' => $fullLiquid,
'configuration_template' => $configurationTemplate,
'data_payload' => json_decode($settings['static_data'] ?? '{}', true),
'preferred_renderer' => $preferredRenderer,
]);
if (! $plugin_updated) {