“WooCommerce -Bestellstatusänderung” Code-Antworten

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

Woocommerce -Bestellstatus

<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

WooCommerce -Bestellstatusänderung

$order = wc_get_order( $order_id );

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

WooCommerce -Bestellstatusänderung

$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

Ähnliche Antworten wie “WooCommerce -Bestellstatusänderung”

Fragen ähnlich wie “WooCommerce -Bestellstatusänderung”

Weitere verwandte Antworten zu “WooCommerce -Bestellstatusänderung” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen