• Resolved royalkosmetik17

    (@royalkosmetik17)


    Hello,

    all orders which are coming in come with the status “on hold”. but I want all orders to come in and automatically have the stauts “processing” . Where can I change that?

    The page I need help with: [log in to see the link]

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

    (@rynald0s)

    Automattic Happiness Engineer

    Howdy!

    You can use the following code that is found here:

    https://metorik.com/blog/autocomplete-all-the-orders-in-woocommerce

    add_action( 'woocommerce_thankyou', 'bryce_wc_autocomplete_order' );
    function bryce_wc_autocomplete_order( $order_id ) {
    	
    	// Only continue if have $order_id
    	if ( ! $order_id ) {
    		return;
    	}
        
        	// Get order
        	$order = wc_get_order( $order_id );
        	
        	// Update order to completed status
        	$order->update_status( 'processing' );	
    }

    I just replaced completed with processing

    This custom code should be added to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as Code Snippets. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update.

    Cheers!

    Thread Starter royalkosmetik17

    (@royalkosmetik17)

    It does not work.

    Thread Starter royalkosmetik17

    (@royalkosmetik17)

    it works. i had a wrong plugin for css. thanks a lot

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Status’ is closed to new replies.