Search
 
SCRIPT & CODE EXAMPLE
 

PHP

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 );
Comment

woocommerce order status

<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>
Comment

woocommerce order status change

$order = wc_get_order( $order_id );

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

PREVIOUS NEXT
Code Example
Php :: post data to another page contact form 7 
Php :: yii2 gridview action change urls 
Php :: php mysql prepared statements 
Php :: wordpress add button to admin bar 
Php :: Laravel Migration - Update Enum Options 
Php :: utc time php 
Php :: php query to hide duplicate records 
Php :: Laravel API Endpoint "401 Unauthorized" on Server But Works Fine On Localhost 
Php :: sort an array in php manually 
Php :: parse json phph 
Php :: smarty php 
Php :: laravel if else condition in blade file 
Php :: Call to undefined function GuzzleHttp\_idn_uri_convert() 
Php :: Hide Add to cart button on specific products 
Php :: php injection 
Php :: how get the size of image in laravel 
Php :: twig resto 
Php :: wordpress get post date custom format 
Php :: update laravel 7 to 8 
Php :: php array push 
Php :: laravel check if collection has value 
Php :: use session in laravel 
Php :: php my admin on linux 
Php :: laravel admin panel free package 
Php :: php api 
Php :: php switch case statement 
Php :: do_shortcode not working 
Php :: laravel has many limit 
Php :: sha256 php cantidad caracteres 
Php :: wp wc php out of stock product to bottom 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =