Nothing happens – virtual products not set as completed
-
Hi
I’m not sure if I have to do anything else, than install the plugin.
I did that – and my products are “virtual” – but still it does not work..
I tried using the code from Woocommerce themselves:
/** * Auto Complete all WooCommerce orders. * Add to theme functions.php file */ add_action( 'woocommerce_thankyou', 'custom_woocommerce_auto_complete_order' ); function custom_woocommerce_auto_complete_order( $order_id ) { global $woocommerce; if ( !$order_id ) return; $order = new WC_Order( $order_id ); $order->update_status( 'completed' ); }
That works. But I don’t want it to complete orders automatically on products that are NOT virtual. And the above code does it on all orders / products.
What can I do to make this work ?
/ Brian
http://wordpress.org/plugins/woocommerce-autocomplete-order/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Nothing happens – virtual products not set as completed’ is closed to new replies.