I would like to automark just success paid orders to "Completed" status. I have searched a lot on Stack and Google, and found this answer code:
WooCommerce: Auto complete paid Orders (depending on Payment methods)
But problem is that the code mark all placed orders to "Completed" status not depending if order was success placed or not.
What do I need to change in the code to automark ONLY Paid orders to "Completed" status?
New enhanced and simplified code version replacement (March 2019):
See: WooCommerce: Auto complete paid orders
Original answer:
For Paypal and other third party gateways, the "paid" order status to target is "processing" (and "completed"), so you can lightly change the code to:
Code goes in function.php file of the active child theme (or active theme). tested and works.