Skip to content

Commit

Permalink
Merge pull request #856 from mollie/fix/PIWOO-368
Browse files Browse the repository at this point in the history
Fix broken advanced settings
  • Loading branch information
mmaymo authored Nov 16, 2023
2 parents 17d1ece + fc5932c commit cb17a19
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions inc/settings/mollie_advanced_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ class="mollie-settings-advanced-payment-desc-label button button-secondary butto
__('Clear now', 'mollie-payments-for-woocommerce')
) . '</a>)',
],
[
'id' => $pluginName . '_sectionend',
'type' => 'sectionend',
],
];

return apply_filters('inpsyde.mollie-advanced-settings', $mollieAdvancedSettings, $pluginName);
3 changes: 2 additions & 1 deletion src/MerchantCapture/MerchantCaptureModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public function run(ContainerInterface $container): bool
{
add_action('init', static function () use ($container) {
$pluginId = $container->get('shared.plugin_id');
$captureSettings = new MollieCaptureSettings();

if (!apply_filters('mollie_wc_gateway_enable_merchant_capture_module', false)) {
return;
Expand Down Expand Up @@ -205,7 +206,7 @@ static function ($disableShipAndCapture, WC_Order $order) use ($container) {
);
add_filter(
'inpsyde.mollie-advanced-settings',
['Mollie\WooCommerce\MerchantCapture\MollieCaptureSettings', 'settings'],
[$captureSettings, 'settings'],
10,
2
);
Expand Down
7 changes: 6 additions & 1 deletion src/MerchantCapture/MollieCaptureSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ class MollieCaptureSettings
public function settings(array $advancedSettings, string $pluginName): array
{
$mollieCaptureSettings = [
[
'id' => $pluginName . '_capture_empty_title',
'title' => '',
'type' => 'title',
],
[
'id' => $pluginName . '_place_payment_onhold',
'title' => __('Placing payments on Hold', 'mollie-payments-for-woocommerce'),
Expand Down Expand Up @@ -40,7 +45,7 @@ public function settings(array $advancedSettings, string $pluginName): array
),
],
[
'id' => $pluginName . '_sectionend',
'id' => $pluginName . '_capture_sectionend',
'type' => 'sectionend',
],
];
Expand Down

0 comments on commit cb17a19

Please sign in to comment.