“Perubahan status pesanan wooCommerce” Kode Jawaban

wooCommerce_order_status_changed

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 );
Shubham Rathod

Status Pesanan WooCommerce

<select id="order_status" name="order_status" >
  <option value="wc-pending">Pending payment</option>
  <option value="wc-processing">Processing</option>
  <option value="wc-on-hold" selected="selected">On hold</option>
  <option value="wc-completed">Completed</option>
  <option value="wc-cancelled">Cancelled</option>
  <option value="wc-refunded">Refunded</option>
  <option value="wc-failed">Failed</option>
</select>
Shadow

Perubahan status pesanan wooCommerce

$order = wc_get_order( $order_id );

if($order){
   $order->update_status( 'pending', '', true );
}
Shadow

Perubahan status pesanan wooCommerce

$order = new WC_Order($order_id);
$order->update_status('pending', 'order_note'); // order note is optional, if you want to  add a note to order
Brave Bird

Jawaban yang mirip dengan “Perubahan status pesanan wooCommerce”

Pertanyaan yang mirip dengan “Perubahan status pesanan wooCommerce”

Lebih banyak jawaban terkait untuk “Perubahan status pesanan wooCommerce” di PHP

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya