Extract unrelated date conversion functionality from date block
[MAILPOET-2665]
This commit is contained in:
committed by
Jack Kitterhing
parent
dc5a296133
commit
7d596e3407
@ -2,7 +2,7 @@
|
||||
|
||||
namespace MailPoet\Models;
|
||||
|
||||
use MailPoet\Form\Block\Date;
|
||||
use MailPoet\Form\Util\DateConverter;
|
||||
use MailPoet\WP\Functions as WPFunctions;
|
||||
|
||||
/**
|
||||
@ -116,7 +116,7 @@ class CustomField extends Model {
|
||||
}
|
||||
|
||||
if (!empty($value)) {
|
||||
$value = (new Date())->convertDateToDatetime($value, $dateFormat);
|
||||
$value = (new DateConverter())->convertDateToDatetime($value, $dateFormat);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user