Refactor for Spree 2.2.x