Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function set_order_status_when_tim($order_id){
- global $woocommerce;
- $tim = $needs_timologio = get_post_meta( $order->id, '_billing_needs_timologio', true );
- if($tim == 1) {
- $order = new WC_Order( $order_id );
- $order->update_status('on-hold');
- }
- }
- add_action('woocommerce_thankyou','set_order_status_when_tim',10,1);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement