/** * Automatically run some actions after a subscription row is saved */ protected function onAfterStore() { // Unblock users when their payment is Complete $this->userUnblock(); if ($this->_dontNotify) { // Do not run the plugins on subscription modification and reset the "do not run" flag $this->_dontNotify = false; } else { // Run the plugins on subscription modification $this->subNotifiable(); } return parent::onAfterStore(); }