• Resolved ultramega

    (@ultramega)


    Hi,
    Is there a way to disable all the cron jobs generated by Shopmagic ?

    Because I need to debug an issue with a payment method and it could be generated by a cron job from Shopmagic.

    Best Regards,
    Cedric

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Bartek

    (@bartj)

    Hi @ultramega,

    It isn’t possible to disable cron/action scheduler jobs from ShopMagic per se, but you can disable executors (actions) from running. I hope this is enough to debug the potential issue.

    For actions which are yet to be added to queue, i.e. new automations, triggered by customer, you can deny ShopMagic from adding an action to the queue with snippet: add_filter('shopmagic/core/automation/should_execute_action', '__return_false');

    For any actions which are already in queue and are waiting for execution, you can force stop execution with throwing an exception:

    add_action(
      'shopmagic/core/action/before_execution',
      function () {
        throw new \RuntimeExecption("Forcefully stopped");
      }
    )

    Best regards,
    Bartek

    Plugin Support rzepsen

    (@rzepsen)

    As we haven’t got any replies, I’m marking this topic as resolved for now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to disable all cron jobs from Shopmagic ?’ is closed to new replies.