From 168c83e6ea144fa7e6eb6b709d08e8e3c1d4282d Mon Sep 17 00:00:00 2001 From: Andy Miller Date: Tue, 20 Jan 2026 19:37:51 -0700 Subject: [PATCH] support for new checkout_url if populated in gpm.premium Signed-off-by: Andy Miller --- .../templates/partials/plugins-details.html.twig | 12 ++++++++---- .../grav/templates/partials/plugins-list.html.twig | 12 ++++++++---- .../grav/templates/partials/themes-details.html.twig | 12 ++++++++---- themes/grav/templates/partials/themes-list.html.twig | 12 ++++++++---- 4 files changed, 32 insertions(+), 16 deletions(-) diff --git a/themes/grav/templates/partials/plugins-details.html.twig b/themes/grav/templates/partials/plugins-details.html.twig index 46ea88e9..46bac4a1 100644 --- a/themes/grav/templates/partials/plugins-details.html.twig +++ b/themes/grav/templates/partials/plugins-details.html.twig @@ -57,11 +57,15 @@ {% else %}
{% if (plugin.premium and not admin.license(plugin.slug)) %} - {% if not gumroad_loaded %} - {% set gumroad_loaded = true %} - + {% if plugin.premium.checkout_url %} + {{ plugin.premium.button|default('Purchase') }} + {% else %} + {% if not gumroad_loaded %} + {% set gumroad_loaded = true %} + + {% endif %} + {{ plugin.premium.button|default('Purchase') }} {% endif %} - {{ plugin.premium.button|default('Purchase') }} {% else %} {{ "PLUGIN_ADMIN.INSTALL_PLUGIN"|t }} {% endif %} diff --git a/themes/grav/templates/partials/plugins-list.html.twig b/themes/grav/templates/partials/plugins-list.html.twig index f17782c9..b1fe9826 100644 --- a/themes/grav/templates/partials/plugins-list.html.twig +++ b/themes/grav/templates/partials/plugins-list.html.twig @@ -49,11 +49,15 @@ {% elseif (installing) %} {% if (plugin.premium and not admin.license(plugin.slug)) %} - {% if not gumroad_loaded %} - {% set gumroad_loaded = true %} - + {% if plugin.premium.checkout_url %} + {{ plugin.premium.button|default('Purchase') }} + {% else %} + {% if not gumroad_loaded %} + {% set gumroad_loaded = true %} + + {% endif %} + {{ plugin.premium.button|default('Purchase') }} {% endif %} - {{ plugin.premium.button|default('Purchase') }} {% else %} {{ "PLUGIN_ADMIN.INSTALL"|t }} {% endif %} diff --git a/themes/grav/templates/partials/themes-details.html.twig b/themes/grav/templates/partials/themes-details.html.twig index afd9d561..8bc97b21 100644 --- a/themes/grav/templates/partials/themes-details.html.twig +++ b/themes/grav/templates/partials/themes-details.html.twig @@ -141,11 +141,15 @@ {% else %}
{% if (theme.premium and not admin.license(theme.slug)) %} - {% if not gumroad_loaded %} - {% set gumroad_loaded = true %} - + {% if theme.premium.checkout_url %} + {{ theme.premium.button|default('Purchase') }} + {% else %} + {% if not gumroad_loaded %} + {% set gumroad_loaded = true %} + + {% endif %} + {{ theme.premium.button|default('Purchase') }} {% endif %} - {{ theme.premium.button|default('Purchase') }} {% else %} {{ "PLUGIN_ADMIN.INSTALL_THEME"|t }} {% endif %} diff --git a/themes/grav/templates/partials/themes-list.html.twig b/themes/grav/templates/partials/themes-list.html.twig index ea1b3c8a..90751d0f 100644 --- a/themes/grav/templates/partials/themes-list.html.twig +++ b/themes/grav/templates/partials/themes-list.html.twig @@ -51,11 +51,15 @@ {% if (state == 'installing') %}
{% if (theme.premium and not admin.license(theme.slug)) %} - {% if not gumroad_loaded %} - {% set gumroad_loaded = true %} - + {% if theme.premium.checkout_url %} + {{ theme.premium.button|default('Purchase') }} + {% else %} + {% if not gumroad_loaded %} + {% set gumroad_loaded = true %} + + {% endif %} + {{ theme.premium.button|default('Purchase') }} {% endif %} - {{ theme.premium.button|default('Purchase') }} {% else %} {{ "PLUGIN_ADMIN.INSTALL"|t }} {% endif %}