Edit plugin function with a hook

Edit plugin function with a hook