【问题标题】:Woocommerce How to change default order status for cash on delivery payment gateway?Woocommerce 如何更改货到付款网关的默认订单状态?
【发布时间】:2013-09-10 12:57:16
【问题描述】:

如果您使用货到付款(支付网关 cod)支付订单,woocommerce 会将订单设置为“暂停”状态。 我需要将新订单的状态设置为“待处理”。

谁能帮帮我?

提前致谢。

曼努埃尔

【问题讨论】:

    标签: payment-gateway woocommerce status


    【解决方案1】:

    此代码将帮助您将逻辑和更改放入函数中

    <?php add_filter (‘woocommerce_payment_complete_order_status’, ‘my_change_status_function’);
    
    
    
     <?php 
    
     function my_change_status_function ($order_id) {
     $order = new WC_Order($order_id);
      //Do whatever additional logic you like before….
      return ‘completed’;
    }
    
    ?>
    

    【讨论】:

      猜你喜欢
      • 2016-12-09
      • 2022-09-30
      • 2018-01-10
      • 2019-09-03
      • 2016-08-26
      • 2018-11-22
      • 2016-02-22
      • 2019-02-21
      • 2017-04-02
      相关资源
      最近更新 更多