diff --git a/inc/settings/mollie_advanced_settings.php b/inc/settings/mollie_advanced_settings.php index abfd156d..553eb31c 100644 --- a/inc/settings/mollie_advanced_settings.php +++ b/inc/settings/mollie_advanced_settings.php @@ -199,6 +199,10 @@ class="mollie-settings-advanced-payment-desc-label button button-secondary butto __('Clear now', 'mollie-payments-for-woocommerce') ) . ')', ], + [ + 'id' => $pluginName . '_sectionend', + 'type' => 'sectionend', + ], ]; return apply_filters('inpsyde.mollie-advanced-settings', $mollieAdvancedSettings, $pluginName); diff --git a/src/MerchantCapture/MerchantCaptureModule.php b/src/MerchantCapture/MerchantCaptureModule.php index 9232061c..15b3ca73 100644 --- a/src/MerchantCapture/MerchantCaptureModule.php +++ b/src/MerchantCapture/MerchantCaptureModule.php @@ -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; @@ -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 ); diff --git a/src/MerchantCapture/MollieCaptureSettings.php b/src/MerchantCapture/MollieCaptureSettings.php index 8a9a2091..f263c1b4 100644 --- a/src/MerchantCapture/MollieCaptureSettings.php +++ b/src/MerchantCapture/MollieCaptureSettings.php @@ -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'), @@ -40,7 +45,7 @@ public function settings(array $advancedSettings, string $pluginName): array ), ], [ - 'id' => $pluginName . '_sectionend', + 'id' => $pluginName . '_capture_sectionend', 'type' => 'sectionend', ], ];