• Rumpelstilzchen公司94

    (@rumpelstilzchen94)


    你好,

    非常感谢您提供了这个简单但非常有效的插件!我真的很喜欢。
    有没有办法禁用当我输入跟踪信息时订单状态将设置为“已完成”的功能?我只想保存跟踪信息,并在以后手动将订单设置为“已完成”时发送

    最佳,
    安迪

查看6条回复-1条到6条(共6条)
  • 掏空

    (@内脏)

    你好,

    作为一个快速修复,只需注释掉mimo-woocommerce-order-tracking.php(插件目录内)的第251行:
    //$order->update_status($this->order_status);
    这将阻止更新订单状态。当订单状态显示为“已完成”时,不要感到困惑。它不是。只要刷新页面,您就会看到。

    您好,Rado

    掏空

    (@内脏)

    再次问候,

    不需要这个快速修复。只需保存表单(按update,而不是从wot元框保存和发送)。
    它无法开箱即用,因为保存元框内容的代码是错误的。第370行的变化

    if(isset($_POST['mimo_shipment_tracking_nonce'])&&wp_verify_nonce($_POST['mimo_shipment_tracking_nonce'],'mimo_shipment_tracking_data'))返回;if(!current_user_can('edit_post',$postid))返回;if(isset($_POST['mimo_tracking_provider_id'])update_post_meta($post_id,'mimo_tracking_provider_id',清理文本字段($_post['imo_tracking-provider_id='));if(isset($_POST['mimo_tracking_number'])update_post_meta($post_id,'mimo_tracking_number',清理文本字段($_post['mimo_tracking_number']));if(isset($_POST['mimo_date_shipped']))update_post_meta($post_id,'mimo_date_shipped',sanitize_text_field($_post['mimo_date_shipped']));

    if(isset($_POST['mimo_shipment_tracking_nonce'])&&wp_verify_nonce[$_POST['mimo _shipment _tracking _nonce'],'mimo_shipment_tracking_data')){if(!current_user_can('edit_post',$post_id))返回;if(isset($_POST['mimo_tracking_provider_id'])update_post_meta($post_id,'mimo_tracking_provider_id',清理文本字段($_post['imo_tracking-provider_id='));if(isset($_POST['mimo_tracking_number'])update_post_meta($post_id,'mimo_tracking_number',清理文本字段($_post['mimo_tracking_number']));if(isset($_POST['mimo_date_shipped']))update_post_meta($post_id,'mimo_date_shipped',sanitize_text_field($_post['mimo_date_shipped']));}

    您好,Rado

    • 此回复在5年4个月前被修改掏空.
    螺纹起动器 伦佩尔斯提琴94

    (@rumpelstilzchen94)

    嘿,内脏,

    谢谢你的回答。

    我的第370行是空的,第371行以以下内容开头:

    if(!current_user_can('edit_post',$postid))返回;

    不太确定该怎么办🙂

    编辑:我用您的代码替换了代码,但无法保存。第394行出错

    语法错误,意外的“public”(T_public)

    掏空

    (@内脏)

    你好,安迪,

    最简单的方法是:只需删除原始的mimo-woococommerce-order-tracking.php文件,并将其替换为这个然后一切都会如期进行(比如点击更新以保存跟踪数据,而无需完成订单、发送电子邮件或添加新提供商)。

    您好,Rado

    螺纹起动器 伦佩尔斯提琴94

    (@rumpelstilzchen94)

    我用你的文件替换了我的文件🙂

    问题是我的条形码扫描仪在每次扫描条形码后都会发送一个“回车”。这样,它将“点击”插件的保存和发送按钮,从而完成订单。我只想保存跟踪号码,但还没有发送

    掏空

    (@内脏)

    好的,那么您可能应该注释掉mimo-woocommerce-order-tracking.php中的第251和252行。这样订单状态就不会更新,也不会发送邮件。
    它应该如下所示:

    //$order=新WC_order($post_id);//$order->update_status($this->order_status);

    只需在每行前面加上2个斜线。

    您好,Rado

查看6个回复-1到6个(共6个)
  • “不要将订单状态设置为已完成”主题对新回复关闭。