File tree Expand file tree Collapse file tree 1 file changed +7
-8
lines changed
app/code/Magento/ConfigurableProduct/Model/Plugin Expand file tree Collapse file tree 1 file changed +7
-8
lines changed Original file line number Diff line number Diff line change 33 * Copyright © Magento, Inc. All rights reserved.
44 * See COPYING.txt for license details.
55 */
6+ declare (strict_types=1 );
7+
68namespace Magento \ConfigurableProduct \Model \Plugin ;
79
10+ use Magento \Catalog \Api \Data \ProductInterface ;
811use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
912
1013/**
11- * Class PriceBackend
12- *
13- * Make price validation optional for configurable product
14+ * Make price validation optional for configurable product
1415 */
1516class PriceBackend
1617{
@@ -26,12 +27,10 @@ public function aroundValidate(
2627 \Closure $ proceed ,
2728 $ object
2829 ) {
29- if ($ object instanceof \Magento \Catalog \Model \Product
30- && $ object ->getTypeId () == Configurable::TYPE_CODE
31- ) {
30+ if ($ object instanceof ProductInterface && $ object ->getTypeId () === Configurable::TYPE_CODE ) {
3231 return true ;
33- } else {
34- return $ proceed ($ object );
3532 }
33+
34+ return $ proceed ($ object );
3635 }
3736}
You can’t perform that action at this time.
0 commit comments