Skip to content

Commit c8e35d0

Browse files
committed
Bump version to 1.3.11
1 parent 79a23d3 commit c8e35d0

File tree

4 files changed

+32
-22
lines changed

4 files changed

+32
-22
lines changed

packages/join-block/join.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Plugin Name: Common Knowledge Join Flow
55
* Description: Common Knowledge join flow plugin.
6-
* Version: 1.3.10
6+
* Version: 1.3.11
77
* Author: Common Knowledge <hello@commonknowledge.coop>
88
* Text Domain: common-knowledge-join-flow
99
* License: GPLv2 or later

packages/join-block/readme.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Tags: membership, subscription, join
44
Contributors: commonknowledgecoop
55
Requires at least: 5.4
66
Tested up to: 6.8
7-
Stable tag: 1.3.10
7+
Stable tag: 1.3.11
88
Requires PHP: 8.1
99
License: GPLv2 or later
1010
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -107,6 +107,8 @@ Need help? Contact us at [hello@commonknowledge.coop](mailto:hello@commonknowled
107107

108108
== Changelog ==
109109

110+
= 1.3.11 =
111+
* Fix bug with display of Direct Debit information when we have a zero priced tier.
110112
= 1.3.10 =
111113
* Add alternative Zetkin integration that supports tagging
112114
= 1.3.9 =

packages/join-flow/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const init = () => {
2424
const sentryDsn = getEnvStr("SENTRY_DSN")
2525
Sentry.init({
2626
dsn: sentryDsn,
27-
release: "1.3.10"
27+
release: "1.3.11"
2828
});
2929

3030
if (getEnv('USE_CHARGEBEE')) {

packages/join-flow/src/pages/confirm.page.tsx

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,25 +47,33 @@ export const ConfirmationPage: StagerComponent<FormSchema> = ({
4747

4848
// Only show Direct Debit payment details if there's actually an amount to pay
4949
if (data.paymentMethod === "directDebit" && data.membership) {
50-
const frequency = getPaymentFrequency(data.membership)
51-
directDebitDetailsMessage = (
52-
<section className="form-section mb-3">
53-
<p>
54-
You are paying for your membership of {organisationName} by Direct Debit.
55-
</p>
56-
<p>
57-
This will be charged {frequency ? frequency + ' ' : ''}from your
58-
bank account.
59-
</p>
60-
<p>
61-
On your bank statement the charge will appear as "{organisationBankName}".
62-
</p>
63-
<p>
64-
You can contact the membership team of {organisationName} at{" "}
65-
<a href={organisationMailToLink}>{organisationEmailAddress}</a>.
66-
</p>
67-
</section>
68-
);
50+
const plan = getPaymentPlan(data.membership);
51+
const isAmountZero = plan && Number(plan.amount) === 0;
52+
const isCustomAmountAboveZero = (plan && plan.allowCustomAmount) ? Number(data.customMembershipAmount) > 0 : false;
53+
const hasDonation = data.donationAmount && Number(data.donationAmount) > 0;
54+
55+
// Only show payment details if there's something to pay (membership, custom amount, or donation)
56+
if (!isAmountZero || isCustomAmountAboveZero || hasDonation) {
57+
const frequency = getPaymentFrequency(data.membership)
58+
directDebitDetailsMessage = (
59+
<section className="form-section mb-3">
60+
<p>
61+
You are paying for your membership of {organisationName} by Direct Debit.
62+
</p>
63+
<p>
64+
This will be charged {frequency ? frequency + ' ' : ''}from your
65+
bank account.
66+
</p>
67+
<p>
68+
On your bank statement the charge will appear as "{organisationBankName}".
69+
</p>
70+
<p>
71+
You can contact the membership team of {organisationName} at{" "}
72+
<a href={organisationMailToLink}>{organisationEmailAddress}</a>.
73+
</p>
74+
</section>
75+
);
76+
}
6977
}
7078

7179
const onSubmit = async () => {

0 commit comments

Comments
 (0)