Changed the way params are passed to the WP patch action