1. <small id='FnuHZ'></small><noframes id='FnuHZ'>

    <legend id='FnuHZ'><style id='FnuHZ'><dir id='FnuHZ'><q id='FnuHZ'></q></dir></style></legend><tfoot id='FnuHZ'></tfoot>
    1. <i id='FnuHZ'><tr id='FnuHZ'><dt id='FnuHZ'><q id='FnuHZ'><span id='FnuHZ'><b id='FnuHZ'><form id='FnuHZ'><ins id='FnuHZ'></ins><ul id='FnuHZ'></ul><sub id='FnuHZ'></sub></form><legend id='FnuHZ'></legend><bdo id='FnuHZ'><pre id='FnuHZ'><center id='FnuHZ'></center></pre></bdo></b><th id='FnuHZ'></th></span></q></dt></tr></i><div id='FnuHZ'><tfoot id='FnuHZ'></tfoot><dl id='FnuHZ'><fieldset id='FnuHZ'></fieldset></dl></div>
      • <bdo id='FnuHZ'></bdo><ul id='FnuHZ'></ul>
    2. 以编程方式更新 Woocommerce 订单

      Updating Woocommerce Orders Programmatically(以编程方式更新 Woocommerce 订单)

    3. <small id='XZOMA'></small><noframes id='XZOMA'>

    4. <tfoot id='XZOMA'></tfoot>
          <tbody id='XZOMA'></tbody>

      1. <legend id='XZOMA'><style id='XZOMA'><dir id='XZOMA'><q id='XZOMA'></q></dir></style></legend>
        <i id='XZOMA'><tr id='XZOMA'><dt id='XZOMA'><q id='XZOMA'><span id='XZOMA'><b id='XZOMA'><form id='XZOMA'><ins id='XZOMA'></ins><ul id='XZOMA'></ul><sub id='XZOMA'></sub></form><legend id='XZOMA'></legend><bdo id='XZOMA'><pre id='XZOMA'><center id='XZOMA'></center></pre></bdo></b><th id='XZOMA'></th></span></q></dt></tr></i><div id='XZOMA'><tfoot id='XZOMA'></tfoot><dl id='XZOMA'><fieldset id='XZOMA'></fieldset></dl></div>

            <bdo id='XZOMA'></bdo><ul id='XZOMA'></ul>

              • 本文介绍了以编程方式更新 Woocommerce 订单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                我有一个在 Wordpress 上运行 Woocommerce 的电子商务网站,运行它的公司已将那里的运输系统更改为一家外部公司,该公司将产品存储在他们的仓库中并在购买产品时发货.

                I have an eCommerce site running Woocommerce on top of Wordpress, and the company running it has changed there shipping system to an external company who stores the products in their warehouse and ships the products when they are bought.

                在自动化方面,下载有关新订单的信息并将其发送给运输公司是可以的,但是当他们使用已发送订单的 XML 和关联的跟踪编号回复我时,我需要能够自动更新订单的系统(包括发送必要的电子邮件).但是,我目前知道如何做到这一点的唯一方法是更新 MySQL 数据库.但是使用这种方法,自动电子邮件系统会被覆盖和忽略.

                In terms of automation, downloading information on new orders and sending it to the shipping company is fine, but when they respond to me with an XML of the orders sent and the associated tracking numbers, I need to be able to have a system that automatically updates the orders (including sending out the emails necessary). However, the only way I currently know how to do that is to update the MySQL database. But with that method, the automated email system is overridden and ignored.

                有谁知道我如何以编程方式更新订单状态和其他信息,这将允许 Woocommerce 的内部功能以与手动登录管理端并更新订单相同的方式执行?

                Does anyone know how I can update orders statues and other information programmatically, which would allow Woocommerce's internal functions to be executed in the same way as manually logging into the admin side and updating the order?

                推荐答案

                找到解决方案了吗?

                下面的代码用于将订单标记为完成,但不会执行您在管理中描述的其他操作

                The code below works to mark an order as complete, but does not execute other actions as you describe in the admin

                // create a new checkout instance and order id
                $checkout = new WC_Checkout();
                $this_order_id = $checkout->create_order();
                
                $order = new WC_Order($this_order_id);
                $order->update_status('completed');
                

                这篇关于以编程方式更新 Woocommerce 订单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)
                  <bdo id='t62lE'></bdo><ul id='t62lE'></ul>
                    <tbody id='t62lE'></tbody>

                    1. <i id='t62lE'><tr id='t62lE'><dt id='t62lE'><q id='t62lE'><span id='t62lE'><b id='t62lE'><form id='t62lE'><ins id='t62lE'></ins><ul id='t62lE'></ul><sub id='t62lE'></sub></form><legend id='t62lE'></legend><bdo id='t62lE'><pre id='t62lE'><center id='t62lE'></center></pre></bdo></b><th id='t62lE'></th></span></q></dt></tr></i><div id='t62lE'><tfoot id='t62lE'></tfoot><dl id='t62lE'><fieldset id='t62lE'></fieldset></dl></div>
                        <legend id='t62lE'><style id='t62lE'><dir id='t62lE'><q id='t62lE'></q></dir></style></legend>
                          <tfoot id='t62lE'></tfoot>

                          <small id='t62lE'></small><noframes id='t62lE'>