Orders On-Hold To UK

0.0/5
<?php
add_action( 'woocommerce_thankyou', 'bbloomer_thankyou_change_order_status' );
 
function bbloomer_thankyou_change_order_status( $order_id ){
   if( ! $order_id ) return;
   	
   $order = wc_get_order( $order_id );
	
   if (get_post_meta( $order->id, '_shipping_country', true ) == "GB") {
   		$order->update_status( 'on-hold-uk' );
   }
   
}

Comments and reviews

{{ reviewsTotal }} Review
{{ reviewsTotal }} Reviews
{{ options.labels.newReviewButton }}
{{ userData.canReview.message }}

Description

Author

Tags