Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Michael Iseard
Kudos-Donations
Commits
63cad0a2
Commit
63cad0a2
authored
Jul 22, 2020
by
Michael Iseard
Browse files
Rename 'button name' to 'donation label'
parent
3ad42385
Changes
7
Hide whitespace changes
Inline
Side-by-side
admin/class-transactions-table.php
View file @
63cad0a2
...
...
@@ -166,7 +166,7 @@ class Transactions_Table extends WP_List_Table {
'type'
=>
__
(
'Type'
,
'kudos-donations'
),
'status'
=>
__
(
'Status'
,
'kudos-donations'
),
'transaction_id'
=>
__
(
'Transaction Id'
,
'kudos-donations'
),
'
button_name'
=>
__
(
'Button Name
'
,
'kudos-donations'
)
'
donation_label'
=>
__
(
'Donation Label
'
,
'kudos-donations'
)
];
}
...
...
includes/class-kudos-activator.php
View file @
63cad0a2
...
...
@@ -61,7 +61,7 @@ class Kudos_Activator {
order_id VARCHAR(255) NOT NULL,
transaction_id VARCHAR(255),
subscription_id VARCHAR(255),
button_name
VARCHAR(255),
donation_label
VARCHAR(255),
PRIMARY KEY (id)
)
$charset_collate
;"
;
...
...
includes/class-kudos-mollie.php
View file @
63cad0a2
...
...
@@ -118,7 +118,7 @@ class Kudos_Mollie
* @param string $interval
* @param string $years
* @param string $redirectUrl
* @param string $
button_name
* @param string $
donation_label
* @param string|null $name
* @param string|null $email
* @param string|null $customerId
...
...
@@ -126,7 +126,7 @@ class Kudos_Mollie
* @return bool|object
* @since 1.0.0
*/
public
function
create_payment
(
$value
,
$interval
,
$years
,
$redirectUrl
,
$
button_name
,
$name
=
null
,
$email
=
null
,
$customerId
=
null
)
{
public
function
create_payment
(
$value
,
$interval
,
$years
,
$redirectUrl
,
$
donation_label
,
$name
=
null
,
$email
=
null
,
$customerId
=
null
)
{
$mollieApi
=
$this
->
mollieApi
;
$order_id
=
'kdo_'
.
time
();
...
...
@@ -164,7 +164,7 @@ class Kudos_Mollie
];
if
(
WP_DEBUG
)
{
$paymentArray
[
'webhookUrl'
]
=
'https://
092120b9a0a6
.ngrok.io/wp-json/kudos/v1/mollie/payment/webhook'
;
$paymentArray
[
'webhookUrl'
]
=
'https://
887dd64e4e2f
.ngrok.io/wp-json/kudos/v1/mollie/payment/webhook'
;
}
// Link payment to customer if specified
...
...
@@ -182,7 +182,8 @@ class Kudos_Mollie
'currency'
=>
$currency
,
'status'
=>
$payment
->
status
,
'sequence_type'
=>
$payment
->
sequenceType
,
'button_name'
=>
$button_name
'donation_label'
=>
$donation_label
,
'mode'
=>
$this
->
apiMode
]);
return
$payment
;
...
...
@@ -253,7 +254,7 @@ class Kudos_Mollie
];
if
(
WP_DEBUG
)
{
$subscriptionArray
[
'webhookUrl'
]
=
'https://
092120b9a0a6
.ngrok.io/wp-json/kudos/v1/mollie/payment/webhook'
;
$subscriptionArray
[
'webhookUrl'
]
=
'https://
887dd64e4e2f
.ngrok.io/wp-json/kudos/v1/mollie/payment/webhook'
;
unset
(
$subscriptionArray
[
'startDate'
]);
// Disable for test mode
}
...
...
public/class-kudos-modal.php
View file @
63cad0a2
...
...
@@ -88,7 +88,7 @@ class Kudos_Modal {
'address_required'
=>
get_option
(
'_kudos_address_required'
),
'privacy_link'
=>
$privacy_link
,
'return_url'
=>
$this
->
returnUrl
,
'
button_name'
=>
$atts
[
'button_name
'
],
'
donation_label'
=>
$atts
[
'donation_label
'
],
'payment_by'
=>
__
(
'Secure payment by'
,
'kudos-donations'
),
'vendor'
=>
(
get_option
(
'_kudos_payment_vendor'
)
?
get_option
(
'_kudos_payment_vendor'
)
:
'mollie'
)
];
...
...
public/class-kudos-public.php
View file @
63cad0a2
...
...
@@ -129,7 +129,7 @@ class Kudos_Public {
$city
=
sanitize_text_field
(
$form
[
'city'
]);
$country
=
sanitize_text_field
(
$form
[
'country'
]);
$redirectUrl
=
sanitize_text_field
(
$form
[
'return_url'
]);
$buttonName
=
sanitize_text_field
(
$form
[
'
button_name
'
]);
$buttonName
=
sanitize_text_field
(
$form
[
'
donation_label
'
]);
$customerId
=
null
;
$mollie
=
new
Kudos_Mollie
();
...
...
@@ -259,7 +259,7 @@ class Kudos_Public {
$atts
=
shortcode_atts
(
[
'label'
=>
''
,
'
button_name
'
=>
''
,
'
donation_label
'
=>
''
,
'alignment'
=>
''
,
'modalHeader'
=>
''
,
'modalBody'
=>
''
...
...
@@ -326,7 +326,7 @@ class Kudos_Public {
$modalId
=
$modal
->
get_id
();
$modal
=
$modal
->
get_payment_modal
([
'header'
=>
$attr
[
'modalHeader'
],
'
button_name
'
=>
(
!
empty
(
$attr
[
'buttonName'
])
?
$attr
[
'buttonName'
]
:
get_the_title
()),
'
donation_label
'
=>
(
!
empty
(
$attr
[
'buttonName'
])
?
$attr
[
'buttonName'
]
:
get_the_title
()),
'text'
=>
$attr
[
'modalBody'
],
'color'
=>
(
!
empty
(
$attr
[
'color'
])
?
$attr
[
'color'
]
:
null
)
]);
...
...
src/js/kudos-button-block.jsx
View file @
63cad0a2
...
...
@@ -138,7 +138,10 @@ export default registerBlockType( 'iseardmedia/kudos-button', {
>
<
PanelRow
>
<
TextControl
label
=
{
__
(
'
Button name
'
,
'
kudos-donations
'
)
}
label
=
{
__
(
'
Donation label
'
,
'
kudos-donations
'
)
}
type
=
{
'
text
'
}
value
=
{
buttonName
}
onChange
=
{
onChangeName
}
...
...
templates/public/modal/donate.modal.html.twig
View file @
63cad0a2
...
...
@@ -15,7 +15,7 @@
{{
nonce
|
raw
}}
<input
required
class=
"kudos_field"
name=
"return_url"
type=
"hidden"
value=
"
{{
return_url
}}
"
>
<input
required
class=
"kudos_field"
name=
"
button_name
"
type=
"hidden"
value=
"
{{
button_name
}}
"
>
<input
required
class=
"kudos_field"
name=
"
donation_label
"
type=
"hidden"
value=
"
{{
donation_label
}}
"
>
<div
class=
"form-tabs"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment