Search code examples
modxmodx-revolution

How do I skip the execution of the plugin code?


MODX Revolution 2.7.3-pl.

there is a plugin that responds to these events:

1.case 'msOnCreateOrder' 2.case 'OnUserSave'

what needs to be written in the plugin code so that the system ignores the plugin code and just continues its work?

the way is this: the client collects the basket, clicks "Order", the system goes to the plugin, the plugin crashes, the system does not continue to work, nothing happens to the client on the page.

i can't just turn off the plugin.

thanks :)


Solution

  • right after

    case 'msOnCreateOrder:'
    

    and

    case 'OnUserSave':
    

    (or even at the very beginning) add

    return true;
    

    thus, the plugin will return a successful result without ever having worked.