diff --git a/src/Payment/MollieSubscription.php b/src/Payment/MollieSubscription.php index 1eb92bb5..6bf7515e 100644 --- a/src/Payment/MollieSubscription.php +++ b/src/Payment/MollieSubscription.php @@ -4,6 +4,7 @@ use Mollie\Api\Types\SequenceType; use Mollie\WooCommerce\Payment\Request\Middleware\MiddlewareHandler; +use Mollie\WooCommerce\Payment\Request\Middleware\PaymentDescriptionMiddleware; use Mollie\WooCommerce\SDK\Api; use Mollie\WooCommerce\Subscription\MollieSubscriptionGatewayHandler; @@ -89,7 +90,13 @@ protected function getRecurringPaymentDescription($order, $option, $initialPayme ); return $description; } - return $this->getPaymentDescription($order, $option); + $middleware = new PaymentDescriptionMiddleware($this->dataHelper); + $requestData = []; + $context = 'payment'; + $result = $middleware->__invoke($requestData, $order, $context, function($requestData) { + return $requestData; + }); + return $result['description']; } /**