Skip to content

Commit

Permalink
Change the description, fix banktransfer and skip gateways wihout expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
inpsyde-maticluznar committed Oct 26, 2023
1 parent bdbd3dd commit 0e82e62
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Payment/PaymentModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,11 @@ public function cancelOrderOnExpiryDate()
foreach ($classNames as $gateway) {
$gatewayName = strtolower($gateway) . '_settings';
$gatewaySettings = get_option($gatewayName);

if (empty($gatewaySettings["activate_expiry_days_setting"]) || $gatewaySettings["activate_expiry_days_setting"] === 'no') {
continue;
}

$heldDuration = isset($gatewaySettings) && isset($gatewaySettings['order_dueDate']) ? $gatewaySettings['order_dueDate'] : 0;

if ($heldDuration < 1) {
Expand Down
6 changes: 6 additions & 0 deletions src/Settings/General/MollieGeneralSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,12 @@ public function gatewayFormFields(
'title' => sprintf(__('Expiry time', 'mollie-payments-for-woocommerce')),
'type' => 'number',
'custom_attributes' => ['step' => '1', 'min' => '10', 'max' => '526000'],
'description' => sprintf(
__(
'Number of MINUTES after the order will expire and will be canceled at Mollie and WooCommerce.',
'mollie-payments-for-woocommerce'
)
),
'default' => '10',
'desc_tip' => false,
],
Expand Down

0 comments on commit 0e82e62

Please sign in to comment.