Spree::CheckoutController.class_eval do

  Spree::PermittedAttributes.checkout_attributes << :gift_code

  durably_decorate :update, mode: 'soft', sha: '908d25b70eff597d32ddad7876cd89d3683d6734' do
    if @order.update_from_params(params, permitted_checkout_attributes)
      if @order.gift_code.present?
        render :edit and return unless apply_gift_code
      end

      persist_user_address
      unless @order.next
        flash[:error] = @order.errors.full_messages.join("\n")
        redirect_to checkout_state_path(@order.state) and return
      end

      if @order.completed?
        session[:order_id] = nil
        flash.notice = Spree.t(:order_processed_successfully)
        flash[:commerce_tracking] = "nothing special"
        redirect_to completion_route
      else
        redirect_to checkout_state_path(@order.state)
      end
    else
      render :edit
    end

  end

end

Spree::CheckoutController.class_eval do

  Spree::PermittedAttributes.checkout_attributes << :gift_code

  durably_decorate :update, mode: 'soft', sha: '9774bcd294f748bd6185a0c8f7d518e624b99ff7' do
    if @order.update_from_params(params, permitted_checkout_attributes)
      if @order.gift_code.present?
        render :edit and return unless apply_gift_code
      end

      @order.temporary_address = !params[:save_user_address]
      unless @order.next
        flash[:error] = @order.errors.full_messages.join("\n")
        redirect_to checkout_state_path(@order.state) and return
      end

      if @order.completed?
        session[:order_id] = nil
        flash.notice = Spree.t(:order_processed_successfully)
        flash[:commerce_tracking] = "nothing special"
        redirect_to completion_route
      else
        redirect_to checkout_state_path(@order.state)
      end
    else
      render :edit
    end

  end

end

Update checkout decorator for Spree 2.4
Update checkout decorator for Spree 2.4

The checkout controller has changed between spree 2.2 -> 2.4, in that
the address parameters now appear to be part of the order details rather
than having to persist it separately.

The commit that changed it in spree is:
https://github.com/spree/spree/commit/7c16987c822b1ca97e2b3f781aa991e1db9697ec#diff-41759f421fa5ee0d427fec7411738b50
