0

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 1

1

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>
4
  • Thanks Diana, what doe <sequence> mean? Apr 12, 2021 at 16:17
  • it's the way you 'tell Magento' which modules to load before your module is loaded.
    – Diana
    Apr 12, 2021 at 16:19
  • Understood, thanks a lot Apr 12, 2021 at 16:21
  • you're welcome :)
    – Diana
    Apr 12, 2021 at 16:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.