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 3
3
* Copyright © Magento, Inc. All rights reserved.
4
4
* See COPYING.txt for license details.
5
5
*/
6
+ declare (strict_types=1 );
7
+
6
8
namespace Magento \ConfigurableProduct \Model \Plugin ;
7
9
10
+ use Magento \Catalog \Api \Data \ProductInterface ;
8
11
use Magento \ConfigurableProduct \Model \Product \Type \Configurable ;
9
12
10
13
/**
11
- * Class PriceBackend
12
- *
13
- * Make price validation optional for configurable product
14
+ * Make price validation optional for configurable product
14
15
*/
15
16
class PriceBackend
16
17
{
@@ -26,12 +27,10 @@ public function aroundValidate(
26
27
\Closure $ proceed ,
27
28
$ object
28
29
) {
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 ) {
32
31
return true ;
33
- } else {
34
- return $ proceed ($ object );
35
32
}
33
+
34
+ return $ proceed ($ object );
36
35
}
37
36
}
You can’t perform that action at this time.
0 commit comments