I am facing error like,
TypeError: Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule::execute(): Argument #1 ($product) must be of type Magento\Catalog\Model\Product, null given, called in /var/www/html/mag244/vendor/magento/module-catalog/Model/Product/Option/Value.php on line 270 and defined in /var/www/html/mag244/vendor/magento/module-catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php:49
Please check this,
<script type="text/x-magento-init">
{
"#product_addtocart_form": {
"priceOptions": {
"optionConfig": TypeError: Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule::execute(): Argument #1 ($product) must be of type Magento\Catalog\Model\Product, null given, called in /var/www/html/mag244/vendor/magento/module-catalog/Model/Product/Option/Value.php on line 270 and defined in /var/www/html/mag244/vendor/magento/module-catalog/Pricing/Price/CalculateCustomOptionCatalogRule.php:49
Stack trace:
#0 /var/www/html/mag244/vendor/magento/module-catalog/Model/Product/Option/Value.php(270): Magento\Catalog\Pricing\Price\CalculateCustomOptionCatalogRule->execute()
#1 /var/www/html/mag244/generated/code/MageWorx/OptionBase/Model/Product/Option/Value/Interceptor.php(140): Magento\Catalog\Model\Product\Option\Value->getPrice()
#2 /var/www/html/mag244/vendor/magento/module-catalog/Block/Product/View/Options.php(171): MageWorx\OptionBase\Model\Product\Option\Value\Interceptor->getPrice()
#3 /var/www/html/mag244/vendor/magento/module-catalog/Block/Product/View/Options.php(227): Magento\Catalog\Block\Product\View\Options->_getPriceConfiguration()
#4 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Catalog\Block\Product\View\Options->getJsonConfig()
#5 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Catalog\Block\Product\View\Options\Interceptor->___callParent()
#6 /var/www/html/mag244/app/code/MageWorx/OptionAdvancedPricing/Plugin/ExtendPriceConfig.php(97): Magento\Catalog\Block\Product\View\Options\Interceptor->Magento\Framework\Interception\{closure}()
#7 /var/www/html/mag244/generated/code/MageWorx/OptionAdvancedPricing/Plugin/ExtendPriceConfig/Interceptor.php(23): MageWorx\OptionAdvancedPricing\Plugin\ExtendPriceConfig->aroundGetJsonConfig()
#8 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(135): MageWorx\OptionAdvancedPricing\Plugin\ExtendPriceConfig\Interceptor->aroundGetJsonConfig()
#9 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Catalog\Block\Product\View\Options\Interceptor->Magento\Framework\Interception\{closure}()
#10 /var/www/html/mag244/generated/code/Magento/Catalog/Block/Product/View/Options/Interceptor.php(68): Magento\Catalog\Block\Product\View\Options\Interceptor->___callPlugins()
#11 /var/www/html/mag244/vendor/magento/module-catalog/view/frontend/templates/product/view/options.phtml(17): Magento\Catalog\Block\Product\View\Options\Interceptor->getJsonConfig()
#12 /var/www/html/mag244/vendor/magento/framework/View/TemplateEngine/Php.php(71): include('...')
#13 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\View\TemplateEngine\Php->render()
#14 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent()
#15 /var/www/html/mag244/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}()
#16 /var/www/html/mag244/generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php(23): Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins()
#17 /var/www/html/mag244/vendor/magento/framework/View/Element/Template.php(263): Magento\Framework\View\TemplateEngine\Php\Interceptor->render()
#18 /var/www/html/mag244/generated/code/Magento/Catalog/Block/Product/View/Options/Interceptor.php(149): Magento\Framework\View\Element\Template->fetchView()
#19 /var/www/html/mag244/vendor/magento/framework/View/Element/Template.php(293): Magento\Catalog\Block\Product\View\Options\Interceptor->fetchView()
#20 /var/www/html/mag244/vendor/magento/framework/View/Element/AbstractBlock.php(1095): Magento\Framework\View\Element\Template->_toHtml()
Please help me!!!
Note: I have installed Mageworx custom option extension.