📜  woocommerce_order_status_changed - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:52.160000             🧑  作者: Mango

代码示例2
function forcesendmail ( $order_id, $old_status, $new_status ){
  $order = new WC_Order($order_id);
    if( $new_status == "processing" ) {
       WC()->mailer()->emails['WC_Email_Customer_Processing_Order']->trigger($order_id);
    }
}

add_action( 'woocommerce_order_status_changed', 'forcesendmail', 99, 3 );