diff --git a/views/meta-box-subscription-update.php b/views/meta-box-subscription-update.php
index 89cbf20c..85d16bb9 100644
--- a/views/meta-box-subscription-update.php
+++ b/views/meta-box-subscription-update.php
@@ -8,6 +8,7 @@
* @package Pronamic\WordPress\Pay
*/
+use Pronamic\WordPress\Html\Element;
use Pronamic\WordPress\Pay\Plugin;
use Pronamic\WordPress\Pay\Subscriptions\SubscriptionPostType;
use Pronamic\WordPress\Pay\Subscriptions\SubscriptionStatus;
@@ -142,19 +143,19 @@
'pronamic-pay-next-payment-date',
- 'name' => 'pronamic_subscription_next_payment_date',
- 'type' => 'date',
- 'value' => null === $next_payment_date ? '' : $next_payment_date->format( 'Y-m-d' ),
- 'data-min' => ( new DateTimeImmutable( 'tomorrow' ) )->format( 'Y-m-d' ),
- ];
-
- \printf(
- '',
- Util::array_to_html_attributes( $atts )
+ $element = new Element(
+ 'input',
+ [
+ 'id' => 'pronamic-pay-next-payment-date',
+ 'name' => 'pronamic_subscription_next_payment_date',
+ 'type' => 'date',
+ 'value' => null === $next_payment_date ? '' : $next_payment_date->format( 'Y-m-d' ),
+ 'data-min' => ( new DateTimeImmutable( 'tomorrow' ) )->format( 'Y-m-d' ),
+ ]
);
+ $element->output();
+
?>