Order Status Pending

0.0/5
<?php
add_action( 'woocommerce_thankyou', 'thankyou_order_status', 10, 1 );
function thankyou_order_status( $order_id ){
    if( ! $order_id ) return;

    $order = new WC_Order( $order_id ); // Get an instance of the WC_Order object

    if ( $order->has_status( 'processing' ) )
            $order-> update_status( 'on-hold' );
}

Comments and reviews

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

Description

Author

Tags