Skip to content

Commit e9eed49

Browse files
committed
fix shopware 6.5 compatibility
1 parent 221a1f6 commit e9eed49

4 files changed

Lines changed: 9 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "codebarista/revocationbutton",
3-
"version": "1.0.0",
3+
"version": "1.1.0",
44
"description": "Revocation button for Shopware 6.4/6.5.",
55
"type": "shopware-platform-plugin",
66
"license": "MIT",

src/Resources/config/services.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
<call method="setContainer">
2020
<argument type="service" id="service_container"/>
2121
</call>
22+
<call method="setTwig">
23+
<argument type="service" id="twig"/>
24+
</call>
2225
</service>
2326
</services>
2427
</container>

src/Resources/views/storefront/includes/revocationform.html.twig

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
data-form-csrf-handler="true"
88
data-form-ajax-submit="true"
99
data-form-ajax-submit-options='{"replaceSelectors": false, "scrollToAlert": true, "resetSubmittedForm": true}'>
10-
{{ sw_csrf('frontend.codebarista.revocation.request') }}
10+
11+
{% if not feature('v6.5.0.0') %}
12+
{% sw_include '@Storefront/storefront/includes/revocationform_csrf.html.twig' %}
13+
{% endif %}
1114

1215
<div class="form-alert"></div>
1316

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{{ sw_csrf('frontend.codebarista.revocation.request') }}

0 commit comments

Comments
 (0)