Uses new helper functions
This commit is contained in:
@@ -74,8 +74,7 @@ class OrderDelivery extends BaseForm
|
||||
if (null === $module) {
|
||||
$context->addViolation(Translator::getInstance()->trans("Delivery module ID not found"));
|
||||
} else {
|
||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
||||
if ($moduleReflection->isSubclassOf("Thelia\Module\DeliveryModuleInterface") === false) {
|
||||
if (! $module->isDeliveryModule()) {
|
||||
$context->addViolation(
|
||||
sprintf(Translator::getInstance()->trans("delivery module %s is not a Thelia\Module\DeliveryModuleInterface"), $module->getCode())
|
||||
);
|
||||
|
||||
@@ -75,8 +75,7 @@ class OrderPayment extends BaseForm
|
||||
$context->addViolation("Payment module ID not found");
|
||||
}
|
||||
|
||||
$moduleReflection = new \ReflectionClass($module->getFullNamespace());
|
||||
if ($moduleReflection->isSubclassOf("Thelia\Module\PaymentModuleInterface") === false) {
|
||||
if (! $module->isPayementModule()) {
|
||||
$context->addViolation(
|
||||
sprintf(Translator::getInstance()->trans("payment module %s is not a Thelia\Module\PaymentModuleInterface"), $module->getCode())
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user