How to update WooCommerce order status to processing when an order is placed using PayPal. Add the following PHP code to your child theme functions.php file.
function update_wc_order_status($posted) {
$order_id = isset($posted['invoice']) ? $posted['invoice'] : '';
if(!empty($order_id)) {
$order = new WC_Order($order_id);
$order->update_status('processing');
}
}
add_action('paypal_ipn_for_wordpress_payment_status_completed', 'update_wc_order_status', 10, 1);