Using WooCommerce and Paypal, sometimes the order does not go from processing to complete on payment of the order at Paypal and you manually have to set it to complete, this snippet as provided by woothemes fixes this issue.

* 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 )
 $order = new WC_Order( $order_id );
 $order->update_status( 'completed' );


Add this to your functions.php file.


Leave a Reply