Your account expired support, please renew to get your support.

HomePage Forums Themes Support Technogy – Electronics Store WooCommerce Theme Add automatic order completed in Woocommerce

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21196
    eoeoe69
    Support Expired

    Hi, I am trying to add the Woocommerce automatic order complete PHP code in my technogy child functions.php theme but WordPress stops working, I tried with a plugin called “code snippets but seems don’t have any effect, can you help me please?

    The code I found on the woo-commerce website (https://woocommerce.com/document/automatically-complete-orders/) is this:

    /**
    * 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’ );
    }

    #21200

    Oh sorry,

    Please send FTP account or Cpanel account for me, I will check and try to help you.

    #21204
    eoeoe69
    Support Expired
    This reply has been marked as private.
    #21208

    I fixed this issue, please recheck

    #21210
    eoeoe69
    Support Expired

    Hi,

    still, the orders are kept on hold after purchasing a product, so the virtual products we sell people cannot download them directly after they pay them… need to wait until we change manually the order in the woocomerce from on hold to be in process or completed,

    can you help me in another way, please?

    #21234
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.