Map action to Apply button in Editor toolbar

For my plugin, I want to call a function when the user presses the “Apply” button in the material editor.
I cant find a callback or hook for this. Is there a way to add functions to buttons that have already been added to the toolbar? Or is there another way for me to do this?