As I work to improve my site's performance, I would like to disable inventory_in_store_pickup_sales_send_order_notified_emails. Please let me know how to disable it?
1 Answer
Create your own module and add the following:
Module/Vendor/etc/crontab.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/crontab.xsd">
<group id="default">
<job name="inventory_in_store_pickup_sales_send_order_notified_emails" instance="Magento\InventoryInStorePickupSales\Model\NotifyOrdersAreReadyForPickupEmailSender" method="execute">
<schedule>* * 31 2 *</schedule>
</job>
</group>
</config>
You are basically tricking Magento into registering a valid cronjob, but the schedule is an unexisting date (hence the 31st of February there:) )
Also, make sure to add the dependency of the original module, like this:
Module/Vendor/etc/module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Module_Vendor">
<sequence>
<module name="Magento_InventoryInStorePickupSales"/>
</sequence>
</module>
</config>
-
-
it's the way you 'tell Magento' which modules to load before your module is loaded.– DianaApr 12, 2021 at 16:19
-
-