Adapt to changes made in regard to spree/spree#2851 and spree/spree#3064