【问题标题】:Spree on shipment_state change callback狂欢 shipping_state 更改回调
【发布时间】:2020-04-22 10:36:10
【问题描述】:

我想在发货状态更改为“已发货”时运行一些代码。我看到有用于订单状态更改回调的 state_machine: state_machine.after_transition to: :complete, do: :do_something 我想知道发货状态是否有类似的东西,如果没有,检测和应对这种变化的最佳方法是什么?

【问题讨论】:

    标签: ruby-on-rails spree solidus


    【解决方案1】:

    是的,您可以使用相同的方法进行发货,例如:

    after_transition to: :shipped, do: :do_something
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多