My solution: change function get Config backorders
1- Create di.xml file in your module
Vendor/Module/etc/di.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<type name="Magento\CatalogInventory\Model\Configuration">
<plugin name="custom_get_backorders" type="Vendor\Module\Plugin\CustomBackorders" sortOrder="1" disabled="false"/>
</type>
2- Create CustomBackorders.php file
Vendor/Module/Plugin/CustomBackorders.php
<?php
namespace Vendor\Module\Plugin;
use Magento\Backend\Model\Auth\Session as BackendSession;
class CustomBackorders
{
/**
* @var BackendSession
*/
protected $_backendSession;
public function __construct(
BackendSession $backendSession
)
{
$this->_backendSession = $backendSession;
}
public function afterGetBackorders(\Magento\CatalogInventory\Model\Configuration $subject, $result)
{
if ($this->_backendSession->isLoggedIn()) {
$result = (int)1;
}
return $result;
}
}