代码之家  ›  专栏  ›  技术社区  ›  MitchEff

客户创建的订单没有配送方式

  •  0
  • MitchEff  · 技术社区  · 5 年前

    我有点觉得这是不可能的。我客户商店的一位客户下了一个订单,没有任何运输方式。比如,不是免费送货,就是没有。

    我可以像这样循环运输方式:

        foreach($order->get_shipping_methods() as $shipping_method ){
            echo '<p><strong>Shipping Method ID:</strong> '. $shipping_method->get_method_id().'<br>
            <strong>Shipping Method name:</strong> '. $shipping_method->get_name().'<br>
            <strong>Shipping Method title:</strong> '. $shipping_method->get_method_title().'<br>
            <strong>Shipping Method Total:</strong> '. $shipping_method->get_total().'<br>
            <strong>Shipping Method Total tax:</strong> '. $shipping_method->get_total_tax().'</p><br>';
        }
    

    它只是空的。我从哪里开始尝试解决这个问题?我很确定没有运输方式,你无法下订单。

    0 回复  |  直到 2 年前