Skip to content

Commit edfda37

Browse files
committed
AC-10472: Placing an order in GraphQL succeeds with an invalid shipping method
1 parent 31ce134 commit edfda37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/QuoteGraphQl/Plugin/ShippingMethodValidationRulePlugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public function __construct(ValidationResultFactory $validationResultFactory)
3434
* @param ValidationResult[] $result
3535
* @param Quote $quote
3636
* @return ValidationResult[]
37+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3738
*/
3839
public function afterValidate(
3940
ShippingMethodValidationRule $subject,
@@ -53,7 +54,6 @@ public function afterValidate(
5354
return $result;
5455
}
5556

56-
// If previously valid, rebuild with a generic error to mark invalid
5757
$existing = $result[0] ?? null;
5858
if ($existing instanceof ValidationResult && $existing->isValid()) {
5959
$result[0] = $this->validationResultFactory->create([

0 commit comments

Comments
 (0)