• Resolved wpressnone

    (@wpressnone)


    Hello there!

    I tried installing your pre-order plugin for free. It’s just that I am encountering some problems with order status and preorder date. It automatically changes its status from “Pre Ordered” to “Completed” and the Preorder Date from “X days to available” to “Already Shipped” once the set pre-order date on the product has been reached. I don’t want any automatic changes. I want to make it manually changed by the shopmanager. Is there any other way to override this?

    Thank you for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Niloy

    (@niloybrightvessel)

    Hi @wpressnone ,
    thanks for your query.
    to prevent the status changed to ‘completed’ from ‘preorder’ you can use this filter hook ‘change_order_status_on_preorder_date’ . or you can buy the pro version.in the pro version, you’ll find an option into the setting panel to set the order status when the pre-order date will be reached.
    example: you want ‘on-hold’ status when the preorder date reached. so you just need to select that from the options dropdown ??

    Thread Starter wpressnone

    (@wpressnone)

    Hello Niloy!

    Thank you for answering my query, may I ask if you can provide a screenshot of the ‘on-hold’ status settings? I cannot find it on documentation.

    Niloy

    (@niloybrightvessel)

    Hi @wpressnone ,
    here is the screenshot https://prnt.sc/wiz74v
    btw, you can use this snippet below for overriding the status

    add_action( 'woocommerce_order_status_changed', 'bv_preorder_to_on_hold', 99, 3 );
    
    function bv_preorder_to_on_hold( $order_id, $old_status, $new_status ) {
        $order = wc_get_order( $order_id );
        if ( $new_status == "pre-ordered" ) {
            $order->update_status('on-hold');
        }
    }
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Auto-changed of Status’ is closed to new replies.