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_changed add action

add_action('woocommerce_order_status_changed', 'woo_order_status_change_custom', 10, 3);
Comment

woocommerce order status change

$order = wc_get_order( $order_id );

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

PREVIOUS NEXT
Code Example
Php :: click confirm before submit form php 
Php :: wp get term link 
Php :: PHP Casting Strings and Floats to Integers 
Php :: echo query in laravel 
Php :: php sql connection string 
Php :: Deleting all files inside a directory laravel 8 
Php :: setup_postdata not working 
Php :: php newline 
Php :: get taxonomy term id from slug - WordPress 
Php :: if null blade laravel 
Php :: reload page in php 
Php :: php get myme type of image 
Php :: php get hour 
Php :: yii2 sql query 
Php :: destroy session php 
Php :: ext-dom php 7.2 
Php :: dynamic alert php 
Php :: clear file contents php 
Php :: smarty shorthand assign var 
Php :: phpmailer with laravel 
Php :: yii2 redirect with 301 
Php :: twig dd 
Php :: laravel increment column value in update query 
Php :: Fetch Data From Database With MySQLI 
Php :: whats the meaninig of void functions in php 
Php :: php qatorni teskari aylantirish 
Php :: link input button in php 
Php :: laravel gigapay create employee 
Php :: php remove double spaces to single space 
Php :: cart icon in woocommerce 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =