Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #941533

    I added the code below in the function.php child theme to have my Woocommerce orders status directly set to COMPLETE but this code prevented another woocommerce plugin from working properly. so i removed it from the function.php file completely, however the status of new order still are set to COMPLETE and i cant understand why its still doing that, is the function.php file somehow cached? is there a way to flush the cache?

    /*
     * Auto Complete all WooCommerce orders.
    */
    add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' );
    function custom_woocommerce_auto_complete_order( $order_id ) { 
        if ( ! $order_id ) {
            return;
        }
    
        $order = wc_get_order( $order_id );
        $order->update_status( 'completed' );
    }
     
    #941896

    Hey kilimats,

    Are you using a caching plugin? The files can be cached by the server too.

    Best regards,
    Victoria

    #941899

    We used a caching plugin but it has been flushed already with no impact, how do i flush the cache on the server?

    #941974

    Hi kilimats,

    Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?

    Best regards,
    Victoria

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.